Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

SSD-19 : Code changes for supporting valuset with ECL having filter expression. #1

Open
wants to merge 13 commits into
base: master
Choose a base branch
from

Conversation

amolht
Copy link

@amolht amolht commented Jun 23, 2020

No description provided.

Copy link

@hankwallace hankwallace left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The whitespace formatting of new code (and some changes to existing code) needs to follow the established code. It appears that existing code uses 2 spaces. Please reformat any changes and new code to follow that.

Dockerfile Outdated

RUN gradle build -x test

CMD gradle -PmainClass=App run --args='-m _bob* -p 10'

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What is the significance of the --args='-m _bob* portion here?

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is there a plan to incorporate some of the commands from the README.md into the Dockerfile and then update the README.md? Should this support more of the arguments currently in the run_synthea script?

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@hankwallace

  1. --args we are using to set different arguments for a patient generation.
  2. I will accommodate run_synthea in Docker file
  3. Then will add these Docker commands at end of README which will be for our pupose only, but will not go to actual pull request.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@hankwallace , Updated Docker file, now it's much shorter and simpler, also updated README for this.

condition(personID, encounterID, condition);
/*condition to ignore codes other then retrieved from terminology url*/
if (!StringUtils.isEmpty(Config.get("generate.terminology_service_url"))) {
if (RandomCodeGenerator.selectedCodes.stream()

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks like there's a mix of spaces and tabs here. Please follow whatever whitespace formatting that the file already had.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@hankwallace I will update whitespace formatting in my eclipse so will not have this sort of issues again.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@hankwallace, this white-space issue fixed on my eclipse, so now there won't be any issue around this.

* Generates random codes based upon ValueSet URIs, with the help of a FHIR terminology service
* API.
* Generates random codes based upon ValueSet URIs, with the help of a FHIR
* terminology service API.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why change the formatting of this comment?

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Its resolved.

Copy link

@hankwallace hankwallace left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please add a description so it's clear what the code changes accomplish.

*/
@SuppressWarnings({ "unchecked", "static-access" })
public static Code getCode(String valueSetUri, long seed) {
expandValueSet(valueSetUri);

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should there be some parameter validation here first?

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@hankwallace, now validating vaueSetUri, if it is wrong one using default code

@@ -192,7 +192,7 @@ generate.payers.selection_behavior = random
generate.payers.loss_of_care = false

# Add a FHIR terminology service URL to enable the use of ValueSet URIs within code definitions.
# generate.terminology_service_url = https://r4.ontoserver.csiro.au/fhir
#generate.terminology_service_url = https://r4.ontoserver.csiro.au/fhir

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please don't make formatting-only changes in the PRs. This will just make it harder on the reviewer once we submit this to the forked repo.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@hankwallace I will make sure to follow existing formatting.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hi @hankwallace, Yes they are not using eclipse default indentation formatting, they have updated for white-space only with size 2.

"Unable to generate code from ValueSet URI: terminology service not configured");
@SuppressWarnings("unchecked")
public static Code getCode(String valueSetUri, long seed, Code code) {
if (urlValidator(valueSetUri)) {
Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@hankwallace, now we are validating uri prior to generating Code, if uri is not valid one we are returning default code.(last parameter for the function.)

@@ -85,6 +85,17 @@ Generate a list of concepts (used in the records) or attributes (variables on ea
./gradlew attributes
```

## Build and Run synthetic patient generator using docker

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍

Copy link

@hankwallace hankwallace left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done with my review. Just one suggestion on exception text, but I'll approve it either way.

valueSet = objectMapper.readValue(response.getBody(), new TypeReference<Map<String, Object>>() {
});
} catch (JsonProcessingException e) {
throw new RuntimeException("JsonProcessingException while parsing valueSet response");

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is there any consistency in the error messages that are being thrown? Usually, there's a pattern of Error <doing something> or Unable to <do something> in the errors. I scanned a few files, but didn't see one.

Consider using a more "readable" error (and use "error" instead of "exception") for this and the one on line 98. Maybe "Error parsing json while expanding ValueSet" here and "Error fetching response while expanding ValueSet" on line 98.

@@ -72,8 +59,7 @@ public void setUp() throws Exception {
Provider.loadProviders(location, 1L);

Payer.clear();
Config.set("generate.payers.insurance_companies.default_file",
"generic/payers/test_payers.csv");
Config.set("generate.payers.insurance_companies.default_file", "generic/payers/test_payers.csv");

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This and many of the ones below are just whitespace changes, right?

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There's only a few, so I'm ok with leaving them.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants