Skip to content

Adjusting documentation#156

Open
Ellerbach wants to merge 6 commits intomicrosoft:masterfrom
Ellerbach:fix-doc-matches-regex
Open

Adjusting documentation#156
Ellerbach wants to merge 6 commits intomicrosoft:masterfrom
Ellerbach:fix-doc-matches-regex

Conversation

@Ellerbach
Copy link
Copy Markdown
Member

  • Fixing replaceMatches documentation as it was not working and incomplete
  • Added a working example of replaceMatches for dates
  • Fixing Markdown issues in the files (non respecting Markdown rules)
  • Fixing tables in Markdown file

@qiwjin qiwjin requested a review from sowu880 December 1, 2021 09:57

Since the output of FHIR expression is flexible, users should provide expressions with valid output value to avoid unexcepted errors.

> **[Important]**:
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

We can make these two points as examples for line 573 "users should provide expressions with valid output value to avoid unexcepted errors.", rather than an "Important" tag here.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

ok, I can adjust this.

|string| `"$this in ('es-AR' \| 'es-ES' \| 'es-UY')": "'es'"`|Data fall in the value set will be mapped to "es".|'es-UY' -> 'es'|
|string| `"$this.startsWith(\'123\')": "$this.subString(0,2)+\'*\*\*\*\' "` |Mask sensitive string code.|'1230005' -> '123****'|
|date, dateTime, time|`"$this >= @2010-1-1": "@2010"`|Data fall in a date/time/dateTime range will be mapped to one date/time/dateTime value.| 2016-03-10 -> 2010|
|date, dateTime, time|`"$this": "$this.toString().replaceMatches('(?<year>[0-9]{2,4})-(?<month>[0-9]{1,2})-(?<day>[0-9]{1,2})', '${year}-${month})'"`|Omit "day" to generalize specific date.|2016-01-01 -> 2016-01|
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

It works if not using toString() here.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

That raises an exception for me saying it can't be datetime can't be cast to .NET string type.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

@sowu880 I tested it again and I still have an exception. That is maybe due to a not perfectly formed date, no idea. Still, with the toString, it does always work fine. Shall we merge this PR?

@Ellerbach
Copy link
Copy Markdown
Member Author

@sowu880 how to have this one green?
image

@qiwjin
Copy link
Copy Markdown
Contributor

qiwjin commented Feb 18, 2022

@sowu880 how to have this one green? image

@ranvijaykumar can you help on this cla item?

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.

3 participants