Extends the FHIRAbstractBase with server talking capabilities. More...
Public Member Functions | |
def | __init__ (self, jsondict=None, strict=True) |
def | as_json (self) |
def | relativeBase (self) |
def | relativePath (self) |
def | server (self) |
Walks the owner hierarchy until it finds an owner with a server. More... | |
def | read (cls, rem_id, server) |
Read the resource with the given id from the given server. More... | |
def | read_from (cls, path, server) |
Requests data from the given REST path on the server and creates an instance of the receiving class. More... | |
def | create (self, server) |
Attempt to create the receiver on the given server, using a POST command. More... | |
def | update (self, server=None) |
Update the receiver's representation on the given server, issuing a PUT command. More... | |
def | delete (self, server=None) |
Delete the receiver from the given server with a DELETE command. More... | |
def | search (self, struct=None) |
Search can be started via a dictionary containing a search construct. More... | |
def | where (cls, struct) |
Search can be started via a dictionary containing a search construct. More... | |
Public Member Functions inherited from fhirclient.models.fhirabstractbase.FHIRAbstractBase | |
def | __init__ (self, jsondict=None, strict=True) |
Initializer. More... | |
def | with_json (cls, jsonobj) |
Initialize an element from a JSON dictionary or array. More... | |
def | with_json_and_owner (cls, jsonobj, owner) |
Instantiates by forwarding to with_json() , then remembers the "owner" of the instantiated elements. More... | |
def | elementProperties (self) |
Returns a list of tuples, one tuple for each property that should be serialized, as: ("name", "json_name", type, is_list, "of_many", not_optional) More... | |
def | update_with_json (self, jsondict) |
Update the receiver with data in a JSON dictionary. More... | |
def | as_json (self) |
Serializes to JSON by inspecting elementProperties() and creating a JSON dictionary of all registered properties. More... | |
def | owningResource (self) |
Walks the owner hierarchy and returns the next parent that is a DomainResource instance. More... | |
def | owningBundle (self) |
Walks the owner hierarchy and returns the next parent that is a Bundle instance. More... | |
def | resolvedReference (self, refid) |
Returns the resolved reference with the given id, if it has been resolved already. More... | |
def | didResolveReference (self, refid, resolved) |
Called by FHIRResource when it resolves a reference. More... | |
Static Public Attributes | |
string | resource_type = 'FHIRAbstractResource' |
Extends the FHIRAbstractBase with server talking capabilities.
def fhirclient.models.fhirabstractresource.FHIRAbstractResource.__init__ | ( | self, | |
jsondict = None , |
|||
strict = True |
|||
) |
def fhirclient.models.fhirabstractresource.FHIRAbstractResource.as_json | ( | self | ) |
def fhirclient.models.fhirabstractresource.FHIRAbstractResource.create | ( | self, | |
server | |||
) |
Attempt to create the receiver on the given server, using a POST command.
:param FHIRServer server: The server to create the receiver on :returns: None or the response JSON on success
def fhirclient.models.fhirabstractresource.FHIRAbstractResource.delete | ( | self, | |
server = None |
|||
) |
Delete the receiver from the given server with a DELETE command.
:param FHIRServer server: The server to update the receiver on; optional, will use the instance's server
if needed. :returns: None or the response JSON on success
def fhirclient.models.fhirabstractresource.FHIRAbstractResource.read | ( | cls, | |
rem_id, | |||
server | |||
) |
Read the resource with the given id from the given server.
The passed-in server instance must support a request_json()
method call, taking a relative path as first (and only mandatory) argument.
:param str rem_id: The id of the resource on the remote server :param FHIRServer server: An instance of a FHIR server or compatible class :returns: An instance of the receiving class
def fhirclient.models.fhirabstractresource.FHIRAbstractResource.read_from | ( | cls, | |
path, | |||
server | |||
) |
Requests data from the given REST path on the server and creates an instance of the receiving class.
:param str path: The REST path to read from :param FHIRServer server: An instance of a FHIR server or compatible class :returns: An instance of the receiving class
def fhirclient.models.fhirabstractresource.FHIRAbstractResource.relativeBase | ( | self | ) |
def fhirclient.models.fhirabstractresource.FHIRAbstractResource.relativePath | ( | self | ) |
def fhirclient.models.fhirabstractresource.FHIRAbstractResource.search | ( | self, | |
struct = None |
|||
) |
Search can be started via a dictionary containing a search construct.
Calling this method with a search struct will return a FHIRSearch
object representing the search struct, with "$type" and "id" added.
:param dict struct: An optional search structure :returns: A FHIRSearch instance
def fhirclient.models.fhirabstractresource.FHIRAbstractResource.server | ( | self | ) |
Walks the owner hierarchy until it finds an owner with a server.
def fhirclient.models.fhirabstractresource.FHIRAbstractResource.update | ( | self, | |
server = None |
|||
) |
Update the receiver's representation on the given server, issuing a PUT command.
:param FHIRServer server: The server to update the receiver on; optional, will use the instance's server
if needed. :returns: None or the response JSON on success
def fhirclient.models.fhirabstractresource.FHIRAbstractResource.where | ( | cls, | |
struct | |||
) |
Search can be started via a dictionary containing a search construct.
Calling this method with a search struct will return a FHIRSearch
object representing the search struct
:param dict struct: A search structure :returns: A FHIRSearch instance
|
static |