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

Refacto of the extensions #213

Merged
merged 22 commits into from
Sep 13, 2023
Merged

Refacto of the extensions #213

merged 22 commits into from
Sep 13, 2023

Conversation

percevalw
Copy link
Member

@percevalw percevalw commented Aug 4, 2023

Description

This PR refactors the extensions of several pipelines to conform with #47.
The current changes are the following (this is still a draft):

Added

  • New to_duration method to convert an absolute date into a date relative to the note_datetime (or None)

Changes

  • Score / disorders / behaviors entities now have a hardcoded label, instead of being dynamically set from the component name. The following scores may have a different name than the current one in your pipelines:
    • eds.emergency.gemsaemergency.gemsa
    • eds.emergency.ccmuemergency.ccmu
    • eds.emergency.priorityemergency.priority
    • eds.charlsoncharlson
    • eds.elston-elliselston-ellis
    • eds.SOFAsofa
    • eds.adicapadicap
    • eds.adicapadicap
  • eds.dates now separate dates from durations. Each entity has its own label:
    • spans["dates"] → entities labelled as date with a span._.date parsed object
    • spans["durations"] → entities labelled as duration with a span._.duration parsed object
  • the "relative" / "absolute" / "duration" mode of the time entity is now stored in
    the mode attribute of the span._.date/duration
  • the "from" / "until" period bound, if any, is now stored in the span._.date.bound attribute
  • to_datetime now only return absolute dates, converts relative dates into absolute if doc._.note_datetime is given, and None otherwise

Checklist

  • If this PR is a bug fix, the bug is documented in the test suite.
  • Changes were documented in the changelog (pending section).
  • If necessary, changes were made to the documentation (eg new pipeline).
  • Refactor eds.measurements
  • Refactor eds.consultation-dates
  • Add value extension

(this PR has integrated the changes of #83)

@percevalw percevalw force-pushed the extension-refacto branch 2 times, most recently from bdfa30a to 3256ea7 Compare August 4, 2023 17:53
@percevalw percevalw force-pushed the extension-refacto branch 3 times, most recently from b1e066d to aa750d0 Compare September 12, 2023 23:29
@percevalw percevalw force-pushed the extension-refacto branch 2 times, most recently from b4d3484 to 69517ac Compare September 13, 2023 00:18
@percevalw percevalw force-pushed the extension-refacto branch 5 times, most recently from 2c37c13 to c8c43ed Compare September 13, 2023 11:14
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.

1 participant