medizininformatik-initiative / Projectathon6-miracum1

5 stars 4 forks source link

Error in seq.int(0, to0 - from, by) : 'to' must be a finite number #17

Closed faubele closed 1 year ago

faubele commented 1 year ago

Problem Description

Shortly after downloading all the necessary FHIR resources, the script stops working and throws an error. The error message is shown below.

Execution Informations

Error Message

...
[1] "Data selection done"
Warning messages:
1: `fhir_style()` was deprecated in fhircrackr 2.0.0.
ℹ Please code style elements directly in fhir_table_description().
2: The `style` argument of `fhir_table_description()` is deprecated as of
fhircrackr 2.0.0.
ℹ Please code style elements directly in the table description. Overwriting
  fhir_table_descriptions arguments for now.
3: In crack_bundles_to_one_table(bundles = bundles, table_description = table_description,  :
  The resource type or columns you are looking for don't seem to be present in the bundles.
 Returning an empty table.
4: In crack_bundles_to_one_table(bundles = bundles, table_description = table_description,  :
  The resource type or columns you are looking for don't seem to be present in the bundles.
 Returning an empty table.
5: In crack_bundles_to_one_table(bundles = bundles, table_description = table_description,  :
  The resource type or columns you are looking for don't seem to be present in the bundles.
 Returning an empty table.
[1] "loading stroke cohort"
[1] "extracting lat and long based on PLZ"
[1] "stroke daily counts - three different outputs"
Error in seq.int(0, to0 - from, by) : 'to' must be a finite number
Calls: source -> withVisible -> eval -> eval -> seq -> seq.Date
Execution halted

Hint

In other projects we had problems with our encounter resources, because there are a lot of resources that have no end-date set. So in the data table 'stroke_cohort.csv the admission_date and discharge_date are 'NA' for some rows.
Maybe this is unexpected and causing problems.

NandhiniS08 commented 1 year ago

Hi, Thanks for raising the issue and providing a hint about the possible cause of the issue. I have added a logic to handle this before creating the different data frames. I hope this clears the error I have also added some new updates from the master branch to the blaze branch as well. This requires a change in config.yml to add a new parameter (max_bundles). Please copy the config_default.yml and update it.

faubele commented 1 year ago

Hi, thank you for providing such a quick fix.
I will pull the new changes and check if everything works fine. The download of the FHIR resources just takes a while, but I will update you as soon as possible.

faubele commented 1 year ago

I pulled the new changes, adjusted the config.yml file and started the docker container again, but sadly the error still appears.

NandhiniS08 commented 1 year ago

Can you tell me what its printing with the message?

NandhiniS08 commented 1 year ago

Solved in the commit for fix #17