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
"""Converting HL7 messages to dictionaries | |
Example Usage: | |
import pprint | |
from hl7apy.parser import parse_message | |
# Taken from http://hl7apy.org/tutorial/index.html#elements-manipulation | |
s = """MSH|^~\&|GHH_ADT||||20080115153000||ADT^A01^ADT_A01|0123456789|P|2.5||||AL | |
EVN||20080115153000||AAA|AAA|20080114003000 |
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
class Object | |
# Retrieve the value of a deeply nested attribute | |
# | |
# Example usage | |
# | |
# attribute = "data.foo['bar'].id" | |
# value = obj.send_nested(attribute) | |
# | |
# Under the hood this will do something akin to | |
# obj.send(data).send(foo)['bar'].send(id) |
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
# The site you want to log in to | |
SITE_URL = nil | |
# The username/password you want to log in with | |
USERNAME = nil | |
PASSWORD = nil | |
# All of these details are visible when you do a "login" and | |
# inspect the parameters POSTed when you click "login" on | |
# the Lock Widget. You'll want to do this in your favorite |
OlderNewer