Skip to content

Commit 1639731

Browse files
sliver007c-schuler
andauthored
Tes package gen (#545)
* Start * Updates * String comparison fixes * Versioned the references from Condition Groupers to RS Groupers * Updated TES Condition Groupers test spreadsheet * Updated TESGeneratePackage operation code * Add author extension to condition groupers * Update TESPackageGenerator.java * Update TESPackageGenerator.java * Removed unnecessary test resources; tes package gen fixes * Fixed failing eRSDTransformer test case * Small fix to DateRoller to work when diff spans new year * Fixed getDaysBetween logic to account for possible year boundary issues * Cleanup * Fixes per review feedback * Various logging and cell read fixes * More changes to incorporate suggested improvements --------- Co-authored-by: c-schuler <hoofschu@gmail.com>
1 parent 955f07e commit 1639731

15 files changed

Lines changed: 694601 additions & 15 deletions

File tree

tooling-cli/src/main/java/org/opencds/cqf/tooling/cli/Main.java

Lines changed: 20 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -228,6 +228,25 @@
228228
So if you want both json and xml bundles, you would specify both -e=json and -e=xml. If no encoding argument
229229
is supplied, the transformer will assume "json" as the default and output a single JSON-encoded bundle.
230230
231+
- CaseReportingTESTESPackageGenerate
232+
- command: mvn exec: java -Dexec.args="-CaseReporting.TES.TESPackageGenerate (-pathtoinputbundle | -ptib) (-outputpath | -op) [-encoding | -e]"
233+
- This Operation takes an input Bundle, parses out the resources it contains and for each Reporting
234+
- Specification Grouper ValueSet a corresponding Condition Grouper ValueSet is created and output.
235+
- The operation supports the following parameters:
236+
- The -v is the version value to be assigned to the version element of the generated artifacts
237+
- The -rl is a string value that will be used as value for the release label extension on generated artifacts
238+
- The -op is the output directory for output
239+
- The default output path is:
240+
<location of the CQF Tooling jar being invoked> + "src/main/resources/org/opencds/cqf/tooling/casereporting/output"
241+
- The -ptib is a path to a file containing the source bundle
242+
- The -ptcgw is the path to the workbook file that contains the mappings from reporting specification groupers to condition groupers
243+
- The -ptccvs is the path to the RCKMS Condition Code value set. It is use to evaluate which condition codes are used and which are not to report, in output, those difference
244+
- The -e is the desired output encoding(s) for the output bundle. The supported output encodings are: { "json", "xml" }.
245+
The "encoding" argument can be specified multiple times and the transformer will output a bundle for each encoding.
246+
So if you want both json and xml bundles, you would specify both -e=json and -e=xml. If no encoding argument
247+
is supplied, the transformer will assume "json" as the default and output a single JSON-encoded bundle.
248+
- The -wcg flag is a boolean that indicates whether or not the generated condition grouper valuesets should be written
249+
- to their own dedicated output file, in addition to being included in the generated bundle file.
231250
*/
232251

233252
//import org.opencds.cqf.tooling.exception.InvalidOperationArgs;
@@ -262,7 +281,7 @@ public class Main {
262281
// // NOTE: we may want to use the Spring Context Library to find the annotated classes
263282
// if (operationClassMap == null) {
264283
// operationClassMap = new HashMap<>();
265-
// Reflections reflections = new Reflections("org.opencds.cqf.tooling.operations");
284+
// Reflections reflections = newReflections("org.opencds.cqf.tooling.operations");
266285
// Set<Class<?>> operationClasses = reflections
267286
// .getTypesAnnotatedWith(Operation.class);
268287
// operationClasses.forEach(clazz -> operationClassMap.put(clazz.getAnnotation(Operation.class).name(), clazz));

tooling-cli/src/main/java/org/opencds/cqf/tooling/cli/OperationFactory.java

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@
99
import org.opencds.cqf.tooling.Operation;
1010
import org.opencds.cqf.tooling.acceleratorkit.DTProcessor;
1111
import org.opencds.cqf.tooling.acceleratorkit.Processor;
12+
import org.opencds.cqf.tooling.casereporting.tes.TESPackageGenerator;
1213
import org.opencds.cqf.tooling.casereporting.transformer.ErsdTransformer;
1314
import org.opencds.cqf.tooling.dateroller.DataDateRollerOperation;
1415
import org.opencds.cqf.tooling.exception.InvalidOperationArgs;
@@ -205,6 +206,8 @@ static Operation createOperation(String operationName) {
205206
return new BundlePublish();
206207
case "TransformErsd":
207208
return new ErsdTransformer();
209+
case "CaseReportingTESGeneratePackage":
210+
return new TESPackageGenerator();
208211
case "RollTestsDataDates":
209212
return new DataDateRollerOperation();
210213
case "ProfilesToSpreadsheet":
Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
package org.opencds.cqf.tooling.casereporting.tes;
2+
3+
import org.opencds.cqf.tooling.utilities.IOUtils;
4+
5+
import java.util.HashSet;
6+
import java.util.Set;
7+
8+
public class TESPackageGenerateParameters {
9+
public String version; // -version (-v)
10+
public String releaseLabel; // -releaselabel (-rl)
11+
public String outputPath; // -outputpath (-op)
12+
public String outputFileName; // -outputfilename (-ofn)
13+
public String pathToInputBundle; // -pathtoinputbundle (-ptib)
14+
public String pathToConditionGrouperWorkbook; // -pathToConditionGrouperWorkbook (-ptcgw)
15+
public String pathToConditionCodeValueSet; // -pathToConditionCodeValueSet (-ptccvs)
16+
public Set<IOUtils.Encoding> outputFileEncodings; // -encoding (-e)
17+
public boolean writeConditionGroupers; // -writeconditiongroupers (-wcg)
18+
}

0 commit comments

Comments
 (0)