Marand Think!EHR service interface
Most of the API is compatible with the Ocean vEHR API.
Login, session, etc.
Description | Signature | Details |
|---|---|---|
Gets Think!EHR server version | String getVersion(); |
|
Login | String login(String userId, String password); | Returns session id |
Closes a session | void closeSession(String sessionId); | Close session with the given id |
Checks if a session is open | boolean isOpenSession(String sessionId); | Returns true if session is open |
Working with EHRs
Description | Signature | Details |
|---|---|---|
Creates a new EHR | String createEhr(String sessionId, String committerName); | Returns newly created EHR's uid |
Creates a new EHR and links it with the subject id in the given subject namespace | String createSubjectEhr(String sessionId, String subjectId, String subjectNamespace, String committerName); | Returns newly created EHR's uid |
Finds EHR with the given subject id and subject namespace | String findEhr(String sessionId, String subjectId, String subjectNamespace); | Returns EHR's uid for given parameters |
Finds subject id for the given ehr uid and subject namespace | String getSubjectId(String sessionId, String ehrId, String subjectNamespace); | Returns subject id |
Sets EHR for session | void useEhr(String sessionId, String ehrId); |
|
Contributions
Creates a new contribution in the current session | void createContribution(String sessionId); |
|
Checks if given session already holds a contribution | boolean hasContribution(String sessionId); | Returns true if current session contains a contribution |
Commits a contribution | void commitContribution(String sessionId, PartyIdentified committer, String comment, AuditChangeType changeType); |
|
Rolls back a contribution | void rollbackContribution(String sessionId); |
|
Create/update/delete of compositions
Adds a new composition to the contribution | String createComposition(String sessionId, VersionLifecycleState lifecycleState, Composition composition); | Returns new composition's uid |
Adds a modification of an existing composition (with the given uid) to the contribution. | String modifyComposition(String sessionId, VersionLifecycleState lifecycleState, String precedingVersionUid, Composition composition); | Returns updated composition's uid |
Adds a deletion of an existing composition to the contribution | void deleteComposition(String sessionId, String committerName, String versionedCompositionUid); |
|
Data retrieval
Returns a composition with the given uid. | Composition getComposition(String sessionId, String compositionUid); |
|
Returns all versions of composition for the given versioned uid | List<Composition> getAllCompositionVersions(String sessionId, String versionedCompositionUid); |
|
Executes given AQL query on EHR currently associated with the session | List<Object[]> queryEhrContent(String sessionId, String aqlQuery); | Returns query results |
Executes given AQL query on all EHRs - i.e. a population query | List<Object[]> queryPopulationContent(String sessionId, String aqlQuery); | Returns query results |