001package org.hl7.fhir.dstu3.model;
002
003/*
004  Copyright (c) 2011+, HL7, Inc.
005  All rights reserved.
006  
007  Redistribution and use in source and binary forms, with or without modification, 
008  are permitted provided that the following conditions are met:
009    
010   * Redistributions of source code must retain the above copyright notice, this 
011     list of conditions and the following disclaimer.
012   * Redistributions in binary form must reproduce the above copyright notice, 
013     this list of conditions and the following disclaimer in the documentation 
014     and/or other materials provided with the distribution.
015   * Neither the name of HL7 nor the names of its contributors may be used to 
016     endorse or promote products derived from this software without specific 
017     prior written permission.
018  
019  THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND 
020  ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED 
021  WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. 
022  IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, 
023  INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT 
024  NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR 
025  PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, 
026  WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) 
027  ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE 
028  POSSIBILITY OF SUCH DAMAGE.
029  
030 */
031
032
033
034import org.hl7.fhir.exceptions.FHIRException;
035
036// Generated on Fri, Mar 16, 2018 15:21+1100 for FHIR v3.0.x
037
038public enum ResourceType {
039    Account,
040    ActivityDefinition,
041    AdverseEvent,
042    AllergyIntolerance,
043    Appointment,
044    AppointmentResponse,
045    AuditEvent,
046    Basic,
047    Binary,
048    BodySite,
049    Bundle,
050    CapabilityStatement,
051    CarePlan,
052    CareTeam,
053    ChargeItem,
054    Claim,
055    ClaimResponse,
056    ClinicalImpression,
057    CodeSystem,
058    Communication,
059    CommunicationRequest,
060    CompartmentDefinition,
061    Composition,
062    ConceptMap,
063    Condition,
064    Consent,
065    Contract,
066    Coverage,
067    DataElement,
068    DetectedIssue,
069    Device,
070    DeviceComponent,
071    DeviceMetric,
072    DeviceRequest,
073    DeviceUseStatement,
074    DiagnosticReport,
075    DocumentManifest,
076    DocumentReference,
077    EligibilityRequest,
078    EligibilityResponse,
079    Encounter,
080    Endpoint,
081    EnrollmentRequest,
082    EnrollmentResponse,
083    EpisodeOfCare,
084    ExpansionProfile,
085    ExplanationOfBenefit,
086    FamilyMemberHistory,
087    Flag,
088    Goal,
089    GraphDefinition,
090    Group,
091    GuidanceResponse,
092    HealthcareService,
093    ImagingManifest,
094    ImagingStudy,
095    Immunization,
096    ImmunizationRecommendation,
097    ImplementationGuide,
098    Library,
099    Linkage,
100    List,
101    Location,
102    Measure,
103    MeasureReport,
104    Media,
105    Medication,
106    MedicationAdministration,
107    MedicationDispense,
108    MedicationRequest,
109    MedicationStatement,
110    MessageDefinition,
111    MessageHeader,
112    NamingSystem,
113    NutritionOrder,
114    Observation,
115    OperationDefinition,
116    OperationOutcome,
117    Organization,
118    Parameters,
119    Patient,
120    PaymentNotice,
121    PaymentReconciliation,
122    Person,
123    PlanDefinition,
124    Practitioner,
125    PractitionerRole,
126    Procedure,
127    ProcedureRequest,
128    ProcessRequest,
129    ProcessResponse,
130    Provenance,
131    Questionnaire,
132    QuestionnaireResponse,
133    ReferralRequest,
134    RelatedPerson,
135    RequestGroup,
136    ResearchStudy,
137    ResearchSubject,
138    RiskAssessment,
139    Schedule,
140    SearchParameter,
141    Sequence,
142    ServiceDefinition,
143    Slot,
144    Specimen,
145    StructureDefinition,
146    StructureMap,
147    Subscription,
148    Substance,
149    SupplyDelivery,
150    SupplyRequest,
151    Task,
152    TestReport,
153    TestScript,
154    ValueSet,
155    VisionPrescription;
156
157
158    public String getPath() {;
159      switch (this) {
160    case Account:
161      return "account";
162    case ActivityDefinition:
163      return "activitydefinition";
164    case AdverseEvent:
165      return "adverseevent";
166    case AllergyIntolerance:
167      return "allergyintolerance";
168    case Appointment:
169      return "appointment";
170    case AppointmentResponse:
171      return "appointmentresponse";
172    case AuditEvent:
173      return "auditevent";
174    case Basic:
175      return "basic";
176    case Binary:
177      return "binary";
178    case BodySite:
179      return "bodysite";
180    case Bundle:
181      return "bundle";
182    case CapabilityStatement:
183      return "capabilitystatement";
184    case CarePlan:
185      return "careplan";
186    case CareTeam:
187      return "careteam";
188    case ChargeItem:
189      return "chargeitem";
190    case Claim:
191      return "claim";
192    case ClaimResponse:
193      return "claimresponse";
194    case ClinicalImpression:
195      return "clinicalimpression";
196    case CodeSystem:
197      return "codesystem";
198    case Communication:
199      return "communication";
200    case CommunicationRequest:
201      return "communicationrequest";
202    case CompartmentDefinition:
203      return "compartmentdefinition";
204    case Composition:
205      return "composition";
206    case ConceptMap:
207      return "conceptmap";
208    case Condition:
209      return "condition";
210    case Consent:
211      return "consent";
212    case Contract:
213      return "contract";
214    case Coverage:
215      return "coverage";
216    case DataElement:
217      return "dataelement";
218    case DetectedIssue:
219      return "detectedissue";
220    case Device:
221      return "device";
222    case DeviceComponent:
223      return "devicecomponent";
224    case DeviceMetric:
225      return "devicemetric";
226    case DeviceRequest:
227      return "devicerequest";
228    case DeviceUseStatement:
229      return "deviceusestatement";
230    case DiagnosticReport:
231      return "diagnosticreport";
232    case DocumentManifest:
233      return "documentmanifest";
234    case DocumentReference:
235      return "documentreference";
236    case EligibilityRequest:
237      return "eligibilityrequest";
238    case EligibilityResponse:
239      return "eligibilityresponse";
240    case Encounter:
241      return "encounter";
242    case Endpoint:
243      return "endpoint";
244    case EnrollmentRequest:
245      return "enrollmentrequest";
246    case EnrollmentResponse:
247      return "enrollmentresponse";
248    case EpisodeOfCare:
249      return "episodeofcare";
250    case ExpansionProfile:
251      return "expansionprofile";
252    case ExplanationOfBenefit:
253      return "explanationofbenefit";
254    case FamilyMemberHistory:
255      return "familymemberhistory";
256    case Flag:
257      return "flag";
258    case Goal:
259      return "goal";
260    case GraphDefinition:
261      return "graphdefinition";
262    case Group:
263      return "group";
264    case GuidanceResponse:
265      return "guidanceresponse";
266    case HealthcareService:
267      return "healthcareservice";
268    case ImagingManifest:
269      return "imagingmanifest";
270    case ImagingStudy:
271      return "imagingstudy";
272    case Immunization:
273      return "immunization";
274    case ImmunizationRecommendation:
275      return "immunizationrecommendation";
276    case ImplementationGuide:
277      return "implementationguide";
278    case Library:
279      return "library";
280    case Linkage:
281      return "linkage";
282    case List:
283      return "list";
284    case Location:
285      return "location";
286    case Measure:
287      return "measure";
288    case MeasureReport:
289      return "measurereport";
290    case Media:
291      return "media";
292    case Medication:
293      return "medication";
294    case MedicationAdministration:
295      return "medicationadministration";
296    case MedicationDispense:
297      return "medicationdispense";
298    case MedicationRequest:
299      return "medicationrequest";
300    case MedicationStatement:
301      return "medicationstatement";
302    case MessageDefinition:
303      return "messagedefinition";
304    case MessageHeader:
305      return "messageheader";
306    case NamingSystem:
307      return "namingsystem";
308    case NutritionOrder:
309      return "nutritionorder";
310    case Observation:
311      return "observation";
312    case OperationDefinition:
313      return "operationdefinition";
314    case OperationOutcome:
315      return "operationoutcome";
316    case Organization:
317      return "organization";
318    case Parameters:
319      return "parameters";
320    case Patient:
321      return "patient";
322    case PaymentNotice:
323      return "paymentnotice";
324    case PaymentReconciliation:
325      return "paymentreconciliation";
326    case Person:
327      return "person";
328    case PlanDefinition:
329      return "plandefinition";
330    case Practitioner:
331      return "practitioner";
332    case PractitionerRole:
333      return "practitionerrole";
334    case Procedure:
335      return "procedure";
336    case ProcedureRequest:
337      return "procedurerequest";
338    case ProcessRequest:
339      return "processrequest";
340    case ProcessResponse:
341      return "processresponse";
342    case Provenance:
343      return "provenance";
344    case Questionnaire:
345      return "questionnaire";
346    case QuestionnaireResponse:
347      return "questionnaireresponse";
348    case ReferralRequest:
349      return "referralrequest";
350    case RelatedPerson:
351      return "relatedperson";
352    case RequestGroup:
353      return "requestgroup";
354    case ResearchStudy:
355      return "researchstudy";
356    case ResearchSubject:
357      return "researchsubject";
358    case RiskAssessment:
359      return "riskassessment";
360    case Schedule:
361      return "schedule";
362    case SearchParameter:
363      return "searchparameter";
364    case Sequence:
365      return "sequence";
366    case ServiceDefinition:
367      return "servicedefinition";
368    case Slot:
369      return "slot";
370    case Specimen:
371      return "specimen";
372    case StructureDefinition:
373      return "structuredefinition";
374    case StructureMap:
375      return "structuremap";
376    case Subscription:
377      return "subscription";
378    case Substance:
379      return "substance";
380    case SupplyDelivery:
381      return "supplydelivery";
382    case SupplyRequest:
383      return "supplyrequest";
384    case Task:
385      return "task";
386    case TestReport:
387      return "testreport";
388    case TestScript:
389      return "testscript";
390    case ValueSet:
391      return "valueset";
392    case VisionPrescription:
393      return "visionprescription";
394    }
395      return null;
396  }
397
398
399    public static ResourceType fromCode(String code) throws FHIRException {;
400    if ("Account".equals(code))
401      return Account;
402    if ("ActivityDefinition".equals(code))
403      return ActivityDefinition;
404    if ("AdverseEvent".equals(code))
405      return AdverseEvent;
406    if ("AllergyIntolerance".equals(code))
407      return AllergyIntolerance;
408    if ("Appointment".equals(code))
409      return Appointment;
410    if ("AppointmentResponse".equals(code))
411      return AppointmentResponse;
412    if ("AuditEvent".equals(code))
413      return AuditEvent;
414    if ("Basic".equals(code))
415      return Basic;
416    if ("Binary".equals(code))
417      return Binary;
418    if ("BodySite".equals(code))
419      return BodySite;
420    if ("Bundle".equals(code))
421      return Bundle;
422    if ("CapabilityStatement".equals(code))
423      return CapabilityStatement;
424    if ("CarePlan".equals(code))
425      return CarePlan;
426    if ("CareTeam".equals(code))
427      return CareTeam;
428    if ("ChargeItem".equals(code))
429      return ChargeItem;
430    if ("Claim".equals(code))
431      return Claim;
432    if ("ClaimResponse".equals(code))
433      return ClaimResponse;
434    if ("ClinicalImpression".equals(code))
435      return ClinicalImpression;
436    if ("CodeSystem".equals(code))
437      return CodeSystem;
438    if ("Communication".equals(code))
439      return Communication;
440    if ("CommunicationRequest".equals(code))
441      return CommunicationRequest;
442    if ("CompartmentDefinition".equals(code))
443      return CompartmentDefinition;
444    if ("Composition".equals(code))
445      return Composition;
446    if ("ConceptMap".equals(code))
447      return ConceptMap;
448    if ("Condition".equals(code))
449      return Condition;
450    if ("Consent".equals(code))
451      return Consent;
452    if ("Contract".equals(code))
453      return Contract;
454    if ("Coverage".equals(code))
455      return Coverage;
456    if ("DataElement".equals(code))
457      return DataElement;
458    if ("DetectedIssue".equals(code))
459      return DetectedIssue;
460    if ("Device".equals(code))
461      return Device;
462    if ("DeviceComponent".equals(code))
463      return DeviceComponent;
464    if ("DeviceMetric".equals(code))
465      return DeviceMetric;
466    if ("DeviceRequest".equals(code))
467      return DeviceRequest;
468    if ("DeviceUseStatement".equals(code))
469      return DeviceUseStatement;
470    if ("DiagnosticReport".equals(code))
471      return DiagnosticReport;
472    if ("DocumentManifest".equals(code))
473      return DocumentManifest;
474    if ("DocumentReference".equals(code))
475      return DocumentReference;
476    if ("EligibilityRequest".equals(code))
477      return EligibilityRequest;
478    if ("EligibilityResponse".equals(code))
479      return EligibilityResponse;
480    if ("Encounter".equals(code))
481      return Encounter;
482    if ("Endpoint".equals(code))
483      return Endpoint;
484    if ("EnrollmentRequest".equals(code))
485      return EnrollmentRequest;
486    if ("EnrollmentResponse".equals(code))
487      return EnrollmentResponse;
488    if ("EpisodeOfCare".equals(code))
489      return EpisodeOfCare;
490    if ("ExpansionProfile".equals(code))
491      return ExpansionProfile;
492    if ("ExplanationOfBenefit".equals(code))
493      return ExplanationOfBenefit;
494    if ("FamilyMemberHistory".equals(code))
495      return FamilyMemberHistory;
496    if ("Flag".equals(code))
497      return Flag;
498    if ("Goal".equals(code))
499      return Goal;
500    if ("GraphDefinition".equals(code))
501      return GraphDefinition;
502    if ("Group".equals(code))
503      return Group;
504    if ("GuidanceResponse".equals(code))
505      return GuidanceResponse;
506    if ("HealthcareService".equals(code))
507      return HealthcareService;
508    if ("ImagingManifest".equals(code))
509      return ImagingManifest;
510    if ("ImagingStudy".equals(code))
511      return ImagingStudy;
512    if ("Immunization".equals(code))
513      return Immunization;
514    if ("ImmunizationRecommendation".equals(code))
515      return ImmunizationRecommendation;
516    if ("ImplementationGuide".equals(code))
517      return ImplementationGuide;
518    if ("Library".equals(code))
519      return Library;
520    if ("Linkage".equals(code))
521      return Linkage;
522    if ("List".equals(code))
523      return List;
524    if ("Location".equals(code))
525      return Location;
526    if ("Measure".equals(code))
527      return Measure;
528    if ("MeasureReport".equals(code))
529      return MeasureReport;
530    if ("Media".equals(code))
531      return Media;
532    if ("Medication".equals(code))
533      return Medication;
534    if ("MedicationAdministration".equals(code))
535      return MedicationAdministration;
536    if ("MedicationDispense".equals(code))
537      return MedicationDispense;
538    if ("MedicationRequest".equals(code))
539      return MedicationRequest;
540    if ("MedicationStatement".equals(code))
541      return MedicationStatement;
542    if ("MessageDefinition".equals(code))
543      return MessageDefinition;
544    if ("MessageHeader".equals(code))
545      return MessageHeader;
546    if ("NamingSystem".equals(code))
547      return NamingSystem;
548    if ("NutritionOrder".equals(code))
549      return NutritionOrder;
550    if ("Observation".equals(code))
551      return Observation;
552    if ("OperationDefinition".equals(code))
553      return OperationDefinition;
554    if ("OperationOutcome".equals(code))
555      return OperationOutcome;
556    if ("Organization".equals(code))
557      return Organization;
558    if ("Parameters".equals(code))
559      return Parameters;
560    if ("Patient".equals(code))
561      return Patient;
562    if ("PaymentNotice".equals(code))
563      return PaymentNotice;
564    if ("PaymentReconciliation".equals(code))
565      return PaymentReconciliation;
566    if ("Person".equals(code))
567      return Person;
568    if ("PlanDefinition".equals(code))
569      return PlanDefinition;
570    if ("Practitioner".equals(code))
571      return Practitioner;
572    if ("PractitionerRole".equals(code))
573      return PractitionerRole;
574    if ("Procedure".equals(code))
575      return Procedure;
576    if ("ProcedureRequest".equals(code))
577      return ProcedureRequest;
578    if ("ProcessRequest".equals(code))
579      return ProcessRequest;
580    if ("ProcessResponse".equals(code))
581      return ProcessResponse;
582    if ("Provenance".equals(code))
583      return Provenance;
584    if ("Questionnaire".equals(code))
585      return Questionnaire;
586    if ("QuestionnaireResponse".equals(code))
587      return QuestionnaireResponse;
588    if ("ReferralRequest".equals(code))
589      return ReferralRequest;
590    if ("RelatedPerson".equals(code))
591      return RelatedPerson;
592    if ("RequestGroup".equals(code))
593      return RequestGroup;
594    if ("ResearchStudy".equals(code))
595      return ResearchStudy;
596    if ("ResearchSubject".equals(code))
597      return ResearchSubject;
598    if ("RiskAssessment".equals(code))
599      return RiskAssessment;
600    if ("Schedule".equals(code))
601      return Schedule;
602    if ("SearchParameter".equals(code))
603      return SearchParameter;
604    if ("Sequence".equals(code))
605      return Sequence;
606    if ("ServiceDefinition".equals(code))
607      return ServiceDefinition;
608    if ("Slot".equals(code))
609      return Slot;
610    if ("Specimen".equals(code))
611      return Specimen;
612    if ("StructureDefinition".equals(code))
613      return StructureDefinition;
614    if ("StructureMap".equals(code))
615      return StructureMap;
616    if ("Subscription".equals(code))
617      return Subscription;
618    if ("Substance".equals(code))
619      return Substance;
620    if ("SupplyDelivery".equals(code))
621      return SupplyDelivery;
622    if ("SupplyRequest".equals(code))
623      return SupplyRequest;
624    if ("Task".equals(code))
625      return Task;
626    if ("TestReport".equals(code))
627      return TestReport;
628    if ("TestScript".equals(code))
629      return TestScript;
630    if ("ValueSet".equals(code))
631      return ValueSet;
632    if ("VisionPrescription".equals(code))
633      return VisionPrescription;
634
635    throw new FHIRException("Unknown resource type"+code);
636  }
637
638}