ARS-toscana / ConcePTIONAlgorithmPregnancies

Repository of the script of the ConcePTION Algorithm for Pregnancies
GNU Affero General Public License v3.0
5 stars 3 forks source link

Join issue in step_03_04_T2.2_internal_consistency_for_EUROCAT #17

Closed DSThayer closed 2 years ago

DSThayer commented 2 years ago

person_id in EUROCAT is numeric, while it's a character field in other data sources. This causes a join error in the mentioned file.

I have solved this by using as.integer to convert D3_persons.person_id and output_spells_category$person_id to integers (inserted at line 52 of the file). I'm not sure that is the right solution, but it makes the code work for me.

GiorgioLimoncella commented 2 years ago

Thanks for fixing the bug! As person_ids are usually characters, I would prefer to turn EUROCAT ids into characters rather than the other way around, how does that sound? (because maybe some future DAP will have EUROCAT ids as character and converting them to integer will create problems)

DSThayer commented 2 years ago

That's fine. Let me know when a corrected version is available, and I'll test it.

On Thu, Jul 21, 2022, 10:32 AM GiorgioLimoncella @.***> wrote:

Thanks for fixing the bug! As person_ids are usually characters, I would prefer to turn EUROCAT ids into characters rather than the other way around, how does that sound? (because maybe some future DAP will have EUROCAT ids as character and converting them to integer will create problems)

— Reply to this email directly, view it on GitHub https://github.com/ARS-toscana/ConcePTIONAlgorithmPregnancies/issues/17#issuecomment-1191559575, or unsubscribe https://github.com/notifications/unsubscribe-auth/AE4G3DR527ISCBNOFZYQCQ3VVFNOLANCNFSM54EREYZA . You are receiving this because you authored the thread.Message ID: @.*** com>

GiorgioLimoncella commented 2 years ago

The bug has been fixed, thank you!