Skip to content

Commit 1a52137

Browse files
committed
Fix formatting
1 parent 1f9569a commit 1a52137

File tree

2 files changed

+21
-29
lines changed

2 files changed

+21
-29
lines changed

ls/server/src/main/java/org/opencds/cqf/cql/ls/server/command/CqlCommand.java

Lines changed: 4 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -206,10 +206,7 @@ public Integer call() throws Exception {
206206
? Uris.parseOrNull(library.terminologyUrl).toURL().getPath()
207207
: null;
208208

209-
var repository = createRepository(
210-
fhirContext,
211-
terminologyPath,
212-
modelPath);
209+
var repository = createRepository(fhirContext, terminologyPath, modelPath);
213210
var engine = Engines.forRepositoryAndSettings(
214211
evaluationSettings, repository, null, new NpmProcessor(igContext), true);
215212

@@ -237,8 +234,7 @@ public Integer call() throws Exception {
237234
return 0;
238235
}
239236

240-
private Repository createRepository(
241-
FhirContext fhirContext, String terminologyUrl, String modelUrl) {
237+
private Repository createRepository(FhirContext fhirContext, String terminologyUrl, String modelUrl) {
242238
Repository data = null;
243239
Repository terminology = null;
244240

@@ -249,15 +245,13 @@ private Repository createRepository(
249245
if (modelUrl != null) {
250246
Path path = Path.of(modelUrl);
251247
data = new IgRepository(fhirContext, path);
252-
}
253-
else {
248+
} else {
254249
data = new NoOpRepository(fhirContext);
255250
}
256251

257252
if (terminologyUrl != null) {
258253
terminology = new IgRepository(fhirContext, Paths.get(terminologyUrl));
259-
}
260-
else {
254+
} else {
261255
terminology = new NoOpRepository(fhirContext);
262256
}
263257

Lines changed: 17 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -1,23 +1,21 @@
11
package org.opencds.cqf.cql.ls.server.command;
22

3+
import ca.uhn.fhir.context.FhirContext;
4+
import ca.uhn.fhir.context.api.BundleInclusionRule;
5+
import ca.uhn.fhir.model.api.IQueryParameterType;
6+
import ca.uhn.fhir.model.valueset.BundleTypeEnum;
7+
import ca.uhn.fhir.rest.api.MethodOutcome;
8+
import ca.uhn.fhir.rest.server.exceptions.ResourceNotFoundException;
39
import java.util.Collections;
410
import java.util.List;
511
import java.util.Map;
612
import java.util.Set;
7-
813
import org.hl7.fhir.instance.model.api.IBaseBundle;
914
import org.hl7.fhir.instance.model.api.IBaseParameters;
1015
import org.hl7.fhir.instance.model.api.IBaseResource;
1116
import org.hl7.fhir.instance.model.api.IIdType;
1217
import org.opencds.cqf.fhir.api.Repository;
1318

14-
import ca.uhn.fhir.context.FhirContext;
15-
import ca.uhn.fhir.context.api.BundleInclusionRule;
16-
import ca.uhn.fhir.model.api.IQueryParameterType;
17-
import ca.uhn.fhir.model.valueset.BundleTypeEnum;
18-
import ca.uhn.fhir.rest.api.MethodOutcome;
19-
import ca.uhn.fhir.rest.server.exceptions.ResourceNotFoundException;
20-
2119
public class NoOpRepository implements Repository {
2220

2321
private final FhirContext fhirContext;
@@ -32,8 +30,8 @@ public <T extends IBaseResource> MethodOutcome create(T arg0, Map<String, String
3230
}
3331

3432
@Override
35-
public <T extends IBaseResource, I extends IIdType> MethodOutcome delete(Class<T> arg0, I arg1,
36-
Map<String, String> arg2) {
33+
public <T extends IBaseResource, I extends IIdType> MethodOutcome delete(
34+
Class<T> arg0, I arg1, Map<String, String> arg2) {
3735
throw new UnsupportedOperationException("Unimplemented method 'delete'");
3836
}
3937

@@ -43,14 +41,14 @@ public FhirContext fhirContext() {
4341
}
4442

4543
@Override
46-
public <R extends IBaseResource, P extends IBaseParameters, T extends IBaseResource> R invoke(Class<T> arg0,
47-
String arg1, P arg2, Class<R> arg3, Map<String, String> arg4) {
44+
public <R extends IBaseResource, P extends IBaseParameters, T extends IBaseResource> R invoke(
45+
Class<T> arg0, String arg1, P arg2, Class<R> arg3, Map<String, String> arg4) {
4846
throw new UnsupportedOperationException("Unimplemented method 'invoke'");
4947
}
5048

5149
@Override
52-
public <R extends IBaseResource, P extends IBaseParameters, I extends IIdType> R invoke(I arg0, String arg1, P arg2,
53-
Class<R> arg3, Map<String, String> arg4) {
50+
public <R extends IBaseResource, P extends IBaseParameters, I extends IIdType> R invoke(
51+
I arg0, String arg1, P arg2, Class<R> arg3, Map<String, String> arg4) {
5452
throw new UnsupportedOperationException("Unimplemented method 'invoke'");
5553
}
5654

@@ -61,16 +59,16 @@ public <T extends IBaseResource, I extends IIdType> T read(Class<T> arg0, I arg1
6159

6260
@SuppressWarnings("unchecked")
6361
@Override
64-
public <B extends IBaseBundle, T extends IBaseResource> B search(Class<B> arg0, Class<T> arg1,
65-
Map<String, List<IQueryParameterType>> arg2, Map<String, String> arg3) {
62+
public <B extends IBaseBundle, T extends IBaseResource> B search(
63+
Class<B> arg0, Class<T> arg1, Map<String, List<IQueryParameterType>> arg2, Map<String, String> arg3) {
6664
var factory = this.fhirContext.newBundleFactory();
67-
factory.addResourcesToBundle(Collections.emptyList(), BundleTypeEnum.SEARCHSET, "", BundleInclusionRule.BASED_ON_INCLUDES, Set.of());
68-
return (B)factory.getResourceBundle();
65+
factory.addResourcesToBundle(
66+
Collections.emptyList(), BundleTypeEnum.SEARCHSET, "", BundleInclusionRule.BASED_ON_INCLUDES, Set.of());
67+
return (B) factory.getResourceBundle();
6968
}
7069

7170
@Override
7271
public <T extends IBaseResource> MethodOutcome update(T arg0, Map<String, String> arg1) {
7372
throw new UnsupportedOperationException("Unimplemented method 'update'");
7473
}
75-
7674
}

0 commit comments

Comments
 (0)