View Javadoc
1   /*
2    * Copyright 2018 the original author or authors.
3    *
4    *  Licensed under the Apache License, Version 2.0 (the "License");
5    *  you may not use this file except in compliance with the License.
6    *  You may obtain a copy of the License at
7    *
8    *         http://www.apache.org/licenses/LICENSE-2.0
9    *
10   *  Unless required by applicable law or agreed to in writing, software
11   *  distributed under the License is distributed on an "AS IS" BASIS,
12   *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13   *  See the License for the specific language governing permissions and
14   *  limitations under the License.
15   */
16  
17  package org.openehealth.ipf.commons.ihe.fhir.pcc44;
18  
19  
20  import org.openehealth.ipf.commons.ihe.fhir.AbstractResourceProvider;
21  import org.openehealth.ipf.commons.ihe.fhir.FhirTransactionOptions;
22  
23  import java.util.Arrays;
24  import java.util.List;
25  
26  
27  /**
28   * @author Christian Ohr
29   * @since 3.5
30   */
31  public enum Pcc44Options implements FhirTransactionOptions {
32  
33      OBSERVATIONS(ObservationResourceProvider.class),
34      ALLERGIES(AllergyIntoleranceResourceProvider.class),
35      CONDITIONS(ConditionResourceProvider.class),
36      DIAGNOSTIC_REPORTS(DiagnosticReportResourceProvider.class),
37      MEDICATIONS(MedicationStatementResourceProvider.class, MedicationRequestResourceProvider.class),
38      IMMUNIZATIONS(ImmunizationResourceProvider.class),
39      PROCEDURES(ProcedureResourceProvider.class),
40      ENCOUNTERS(EncounterResourceProvider.class),
41      ALL(ObservationResourceProvider.class,
42              AllergyIntoleranceResourceProvider.class,
43              ConditionResourceProvider.class,
44              DiagnosticReportResourceProvider.class,
45              MedicationStatementResourceProvider.class,
46              MedicationRequestResourceProvider.class,
47              ImmunizationResourceProvider.class,
48              ProcedureResourceProvider.class,
49              EncounterResourceProvider.class);
50  
51      private List<Class<? extends AbstractResourceProvider>> resourceProviders;
52  
53      Pcc44Options(Class<? extends AbstractResourceProvider>... resourceProviders) {
54          this.resourceProviders = Arrays.asList(resourceProviders);
55      }
56  
57      @Override
58      public List<Class<? extends AbstractResourceProvider>> getSupportedThings() {
59          return resourceProviders;
60      }
61  
62  
63  }