-
Notifications
You must be signed in to change notification settings - Fork 181
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
Update Doc for Filters #365
Conversation
Create New Release 4.3.0
Create New Release 4.4.0
* Update README.md * Update README.md * Update README.md * Update README.md * Update README.md * Update Filters-and-Tags.md * Update README.md * Update README.md * Update README.md
Release request
docs/Filters-and-Tags.md
Outdated
| add_hyphens_date | Adds hyphens to a date without hyphens | `{{ PID.7.Value \| add_hyphens_date }}` | | ||
| format_as_date_time | Converts an YYYYMMDDHHmmssSSS string (e.g. 20040629175400000) to a dateTime format (e.g. 2004-06-29T17:54:00.000z). Provides parameters to handle time zone: `preserve`, `utc`, `local`. The default method is `local`. | `{{ PID.29.Value \| format_as_date_time: 'utc' }}` | | ||
| add_hyphens_date | Adds hyphens to a date or partial date without hyphens. The input date format is YYYY, YYYYMM, or YYYYMMDD. The output format is valid FHIR date or partial date format: YYYY, YYYY-MM, or YYYY-MM-DD. | `{{ PID.7.Value \| add_hyphens_date }}` | | ||
| format_as_date_time | Converts valid [HL7v2 and C-CDA datetime](https://hl7-definition.caristix.com/v2/HL7v2.8/DataTypes/DTM) (datetime or partial datetime without hyphens, e.g. 20040629175400000) to valid [FHIR datetime format](http://hl7.org/fhir/R4/datatypes.html) (e.g. 2004-06-29T17:54:00.000Z). Provides parameters to handle time zone: `preserve`, `utc`, `local`. The default method is `preserve`. | `{{ PID.29.Value \| format_as_date_time: 'utc' }}` | |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It is mentioned in previous discussion that we may not able to quote references of this website directly. We can put the format here instead of adding a link.
docs/Filters-and-Tags.md
Outdated
``` | ||
|
||
> [Note] : If the input is a partial datetime without time zone, it will be set to the first day of the year and 00:00:00 clock time with local time zone as suffix. e.g. In the location with +08:00 time zone, the input string "201101031434" will be filled to "20110103143400+0800", | ||
the template `{{ "201101031434"| format_as_date_time: 'utc'}}` will output 2011-01-03T06:34:00Z at +08:00 location. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nit: the template {{ "201101031434" | format_as_date_time: 'utc'}}
will output 2011-01-03T06:34:00Z
when running at +08:00 location.
docs/Filters-and-Tags.md
Outdated
@@ -55,10 +55,43 @@ If these filters do not meet your needs, you can also write your own filters. | |||
### DateTime filters | |||
| Filter | Description | Syntax | | |||
|-|-|-| | |||
| add_hyphens_date | Adds hyphens to a date without hyphens | `{{ PID.7.Value \| add_hyphens_date }}` | | |||
| format_as_date_time | Converts an YYYYMMDDHHmmssSSS string (e.g. 20040629175400000) to a dateTime format (e.g. 2004-06-29T17:54:00.000z). Provides parameters to handle time zone: `preserve`, `utc`, `local`. The default method is `local`. | `{{ PID.29.Value \| format_as_date_time: 'utc' }}` | | |||
| add_hyphens_date | Adds hyphens to a date or partial date without hyphens. The input date format is YYYY, YYYYMM, or YYYYMMDD. The output format is valid FHIR date or partial date format: YYYY, YYYY-MM, or YYYY-MM-DD. | `{{ PID.7.Value \| add_hyphens_date }}` | |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nit: Adds hyphens to a date or a partial date that does not have hyphens to make it into a valid FHIR format. The input date format is YYYY, YYYYMM, or YYYYMMDD. The output format is a valid FHIR date or a partial date format: YYYY, YYYY-MM, or YYYY-MM-DD.
docs/Filters-and-Tags.md
Outdated
| add_hyphens_date | Adds hyphens to a date without hyphens | `{{ PID.7.Value \| add_hyphens_date }}` | | ||
| format_as_date_time | Converts an YYYYMMDDHHmmssSSS string (e.g. 20040629175400000) to a dateTime format (e.g. 2004-06-29T17:54:00.000z). Provides parameters to handle time zone: `preserve`, `utc`, `local`. The default method is `local`. | `{{ PID.29.Value \| format_as_date_time: 'utc' }}` | | ||
| add_hyphens_date | Adds hyphens to a date or partial date without hyphens. The input date format is YYYY, YYYYMM, or YYYYMMDD. The output format is valid FHIR date or partial date format: YYYY, YYYY-MM, or YYYY-MM-DD. | `{{ PID.7.Value \| add_hyphens_date }}` | | ||
| format_as_date_time | Converts valid HL7v2 and C-CDA datetime (datetime or partial datetime without hyphens :YYYY[MM[DD[HH[MM[SS[.S[S[S[S]]]]]]]]][+/-ZZZZ] , e.g. 20040629175400000) to valid [FHIR datetime format](http://hl7.org/fhir/R4/datatypes.html) (e.g. 2004-06-29T17:54:00.000Z). Provides parameters to handle time zone: `preserve`, `utc`, `local`. The default method is `preserve`. | `{{ PID.29.Value \| format_as_date_time: 'utc' }}` | |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Converts valid HL7v2 and C-CDA datetime to a valid FHIR datetime format. The input datetime format is datetime or partial datetime without hyphens: YYYY[MM[DD[HH[MM[SS[.S[S[S[S]]]]]]]]][+/-ZZZZ]. For example, the input 20040629175400000 will have the output 2004-06-29T17:54:00.000Z. Provides parameters to handle different time zones: preserve
, utc
, local
. The default method is preserve
.
docs/Filters-and-Tags.md
Outdated
| add_hyphens_date | Adds hyphens to a date without hyphens | `{{ PID.7.Value \| add_hyphens_date }}` | | ||
| format_as_date_time | Converts an YYYYMMDDHHmmssSSS string (e.g. 20040629175400000) to a dateTime format (e.g. 2004-06-29T17:54:00.000z). Provides parameters to handle time zone: `preserve`, `utc`, `local`. The default method is `local`. | `{{ PID.29.Value \| format_as_date_time: 'utc' }}` | | ||
| add_hyphens_date | Adds hyphens to a date or partial date without hyphens. The input date format is YYYY, YYYYMM, or YYYYMMDD. The output format is valid FHIR date or partial date format: YYYY, YYYY-MM, or YYYY-MM-DD. | `{{ PID.7.Value \| add_hyphens_date }}` | | ||
| format_as_date_time | Converts valid HL7v2 and C-CDA datetime (datetime or partial datetime without hyphens :YYYY[MM[DD[HH[MM[SS[.S[S[S[S]]]]]]]]][+/-ZZZZ] , e.g. 20040629175400000) to valid [FHIR datetime format](http://hl7.org/fhir/R4/datatypes.html) (e.g. 2004-06-29T17:54:00.000Z). Provides parameters to handle time zone: `preserve`, `utc`, `local`. The default method is `preserve`. | `{{ PID.29.Value \| format_as_date_time: 'utc' }}` | | ||
| now | Provides current time in a specific format. The default format is "yyyy-MM-ddTHH:mm:ss.FFFZ". | `{{ '' \| now: 'dddd, dd MMMM yyyy HH:mm:ss' }}` | |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nit: Provides the current time in a specific format. The default format is yyyy-MM-ddTHH:mm:ss.FFFZ.
docs/Filters-and-Tags.md
Outdated
| now | Provides current time in a specific format. The default format is "yyyy-MM-ddTHH:mm:ss.FFFZ". | `{{ '' \| now: 'dddd, dd MMMM yyyy HH:mm:ss' }}` | | ||
| add_seconds | Adds double seconds on datetime in FHIR format. Provides parameters to set time zones: `preserve`, `utc`, `local`. The default is set to the parameter `preserve`. | `{{ "2021-01-01T00:00:00Z" \| add_seconds:100.1 }}` | | ||
| add_seconds | Adds double seconds on valid [FHIR datetime](http://hl7.org/fhir/R4/datatypes.html) as input (e.g.2021-01-01T00:00:00Z ) and output a valid FHIR datetime. Provides parameters of double seconds to add and settings of time zones: `preserve`, `utc`, `local`. The default set of time zone parameter is `preserve`. | `{{ "2021-01-01T00:00:00Z" \| add_seconds:100.1, 'utc' }}` | |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Adds double seconds on a valid FHIR datetime (e.g. 2021-01-01T00:00:00Z). Provides parameters to handle different time zones: preserve
, utc
, local
. The default method is preserve
.
docs/Filters-and-Tags.md
Outdated
| add_seconds | Adds double seconds on datetime in FHIR format. Provides parameters to set time zones: `preserve`, `utc`, `local`. The default is set to the parameter `preserve`. | `{{ "2021-01-01T00:00:00Z" \| add_seconds:100.1 }}` | | ||
| add_seconds | Adds double seconds on valid [FHIR datetime](http://hl7.org/fhir/R4/datatypes.html) as input (e.g.2021-01-01T00:00:00Z ) and output a valid FHIR datetime. Provides parameters of double seconds to add and settings of time zones: `preserve`, `utc`, `local`. The default set of time zone parameter is `preserve`. | `{{ "2021-01-01T00:00:00Z" \| add_seconds:100.1, 'utc' }}` | | ||
|
||
Examples: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
DateTime filter usage examples:
@ginalee-dotcom @sowu880 Are we ready to merge this PR? |
…fer/pgcritiques-merge * 'main' of github.com:microsoft/FHIR-Converter: Global Readiness Manifest file GeoPol.xml Update version (microsoft#375) Remove blank lines (microsoft#374) Update Doc for Filters (microsoft#365) Switch FormatAsDateTime timezone handling to preserve to maintain consistency (microsoft#358) Revert "reset to local (microsoft#368)" reset to local (microsoft#368) Phase -2, Milestone-3 Mapping (microsoft#366) Change Default Time Zone Handling (microsoft#363) Turn on mac functional test check (microsoft#367) Fix warnings (microsoft#364) Fix Time Zone Bug (microsoft#353) Phase2 - Milestone 1&2 Mapping (microsoft#354) Add check for large for loops (microsoft#361) Updated the logic of checking the number of default templates Update pipeline win host version (microsoft#359)
Give more detailed descriptions and examples for our date and datetime related filters