Skip to content

Commit

Permalink
Tes package gen (#545)
Browse files Browse the repository at this point in the history
* 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 <[email protected]>
  • Loading branch information
sliver007 and c-schuler authored Feb 7, 2025
1 parent 955f07e commit 1639731
Show file tree
Hide file tree
Showing 15 changed files with 694,601 additions and 15 deletions.
21 changes: 20 additions & 1 deletion tooling-cli/src/main/java/org/opencds/cqf/tooling/cli/Main.java
Original file line number Diff line number Diff line change
Expand Up @@ -228,6 +228,25 @@
So if you want both json and xml bundles, you would specify both -e=json and -e=xml. If no encoding argument
is supplied, the transformer will assume "json" as the default and output a single JSON-encoded bundle.
- CaseReportingTESTESPackageGenerate
- command: mvn exec: java -Dexec.args="-CaseReporting.TES.TESPackageGenerate (-pathtoinputbundle | -ptib) (-outputpath | -op) [-encoding | -e]"
- This Operation takes an input Bundle, parses out the resources it contains and for each Reporting
- Specification Grouper ValueSet a corresponding Condition Grouper ValueSet is created and output.
- The operation supports the following parameters:
- The -v is the version value to be assigned to the version element of the generated artifacts
- The -rl is a string value that will be used as value for the release label extension on generated artifacts
- The -op is the output directory for output
- The default output path is:
<location of the CQF Tooling jar being invoked> + "src/main/resources/org/opencds/cqf/tooling/casereporting/output"
- The -ptib is a path to a file containing the source bundle
- The -ptcgw is the path to the workbook file that contains the mappings from reporting specification groupers to condition groupers
- 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
- The -e is the desired output encoding(s) for the output bundle. The supported output encodings are: { "json", "xml" }.
The "encoding" argument can be specified multiple times and the transformer will output a bundle for each encoding.
So if you want both json and xml bundles, you would specify both -e=json and -e=xml. If no encoding argument
is supplied, the transformer will assume "json" as the default and output a single JSON-encoded bundle.
- The -wcg flag is a boolean that indicates whether or not the generated condition grouper valuesets should be written
- to their own dedicated output file, in addition to being included in the generated bundle file.
*/

//import org.opencds.cqf.tooling.exception.InvalidOperationArgs;
Expand Down Expand Up @@ -262,7 +281,7 @@ public class Main {
// // NOTE: we may want to use the Spring Context Library to find the annotated classes
// if (operationClassMap == null) {
// operationClassMap = new HashMap<>();
// Reflections reflections = new Reflections("org.opencds.cqf.tooling.operations");
// Reflections reflections = newReflections("org.opencds.cqf.tooling.operations");
// Set<Class<?>> operationClasses = reflections
// .getTypesAnnotatedWith(Operation.class);
// operationClasses.forEach(clazz -> operationClassMap.put(clazz.getAnnotation(Operation.class).name(), clazz));
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
import org.opencds.cqf.tooling.Operation;
import org.opencds.cqf.tooling.acceleratorkit.DTProcessor;
import org.opencds.cqf.tooling.acceleratorkit.Processor;
import org.opencds.cqf.tooling.casereporting.tes.TESPackageGenerator;
import org.opencds.cqf.tooling.casereporting.transformer.ErsdTransformer;
import org.opencds.cqf.tooling.dateroller.DataDateRollerOperation;
import org.opencds.cqf.tooling.exception.InvalidOperationArgs;
Expand Down Expand Up @@ -205,6 +206,8 @@ static Operation createOperation(String operationName) {
return new BundlePublish();
case "TransformErsd":
return new ErsdTransformer();
case "CaseReportingTESGeneratePackage":
return new TESPackageGenerator();
case "RollTestsDataDates":
return new DataDateRollerOperation();
case "ProfilesToSpreadsheet":
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
package org.opencds.cqf.tooling.casereporting.tes;

import org.opencds.cqf.tooling.utilities.IOUtils;

import java.util.HashSet;
import java.util.Set;

public class TESPackageGenerateParameters {
public String version; // -version (-v)
public String releaseLabel; // -releaselabel (-rl)
public String outputPath; // -outputpath (-op)
public String outputFileName; // -outputfilename (-ofn)
public String pathToInputBundle; // -pathtoinputbundle (-ptib)
public String pathToConditionGrouperWorkbook; // -pathToConditionGrouperWorkbook (-ptcgw)
public String pathToConditionCodeValueSet; // -pathToConditionCodeValueSet (-ptccvs)
public Set<IOUtils.Encoding> outputFileEncodings; // -encoding (-e)
public boolean writeConditionGroupers; // -writeconditiongroupers (-wcg)
}
Loading

0 comments on commit 1639731

Please sign in to comment.