-
Notifications
You must be signed in to change notification settings - Fork 1
14 physician note examples #19
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
Open
comorbidity
wants to merge
6
commits into
main
Choose a base branch
from
14-physician-note-examples
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
Show all changes
6 commits
Select commit
Hold shift + click to select a range
1004189
moved test-integration files that depend on ctakes server.
comorbidity 5b6bf65
*NOT PHI* not real patients. Curated Medical Transcription samples
comorbidity 9ddb7fd
*NOT PHI* not real patients - Synthea AI generated examples
comorbidity 77c0214
added list_match_type helper function that parallels otehr list_match…
comorbidity a5dbd21
client.py includes optional hints for UTF-8 and ASCII encoding.
comorbidity 4b769a0
added Term Frequency calculations like "patient" and "cough"
comorbidity File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,9 @@ | ||
"""Public API""" | ||
|
||
from . import typesystem | ||
from .typesystem import CtakesJSON, MatchText, Polarity, Span | ||
from .typesystem import UmlsTypeMention, UmlsConcept | ||
|
||
from . import filesystem | ||
from . import client | ||
from . import transformer |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -24,12 +24,29 @@ def get_url_ctakes_rest() -> str: | |
'URL_CTAKES_REST', | ||
'http://localhost:8080/ctakes-web-rest/service/analyze') | ||
|
||
def ascii(sentence:str) -> bytes: | ||
""" | ||
https://pythonguides.com/remove-unicode-characters-in-python/#:~:text=In%20python%2C%20to%20remove%20non,decode(). | ||
:param sentence: | ||
:return: sentence REMOVED of unicode chars - note LENGTH of text input may change! | ||
""" | ||
return sentence.encode("ascii", "ignore") | ||
|
||
def utf8(sentence:str) -> bytes: | ||
""" | ||
https://stackoverflow.com/questions/34618149/post-unicode-string-to-web-service-using-python-requests-library | ||
:param sentence: | ||
:return: sentence ESCAPED unicode chars - note LENGTH of text input may change! | ||
""" | ||
# import re | ||
# return re.sub(r'[^\u1F600-\u1F64F ]|[^\u1F300-\u1F5FF ]', " ", sentence) | ||
Comment on lines
+41
to
+42
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Can delete these comment lines. |
||
return sentence.encode("utf-8") | ||
|
||
def post(sentence: str, url=get_url_ctakes_rest()) -> dict: | ||
""" | ||
:param sentence: clinical text to send to cTAKES | ||
:param url: cTAKES REST server fully qualified path | ||
:return: | ||
:return: dict JSON response from cTAKES | ||
""" | ||
logging.debug(url) | ||
# TODO: consider exposing a pass-through timeout parameter | ||
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Empty file.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.
Convenience imports, so consumers don't have to use
ctakesclient.typesystem
? I kind of like the idea of having one canonical import location though -- if we do this, how do you feel about dropping thefrom . import typesystem
then?