Java Client Read Document Headers

From OpenIndivo Documentation Wiki

Jump to: navigation, search

Read all the document headers in a record. Optionally constrain the read to headers with a specific document classification.

Contents

Code examples

Read all active document headers

Reads all active document headers in a record.

String username = "username@indivohealth.org";
String password = "password";
AuthenticateResultType authResult = client.authenticate(username, password); String ticket = authResult.getActorTicket();
ReadDocumentHeaderListResultType result = client.readDocumentHeaders( authResult.getActorTicket(), username, null, true);

Read active document headers classified as credentials

Reads all active document headers classified as credentials in a record.

String username = "username@indivohealth.org";
String password = "password";
AuthenticateResultType authResult = client.authenticate(username, password); String ticket = authResult.getActorTicket();
ReadDocumentHeaderListResultType result = client.readDocumentHeaders( authResult.getActorTicket(), username, DocumentClassificationUrns.CREDENTIALS, true);

Read all document headers (active AND inactive)

Reads all document headers in a record.

String username = "username@indivohealth.org";
String password = "password";
AuthenticateResultType authResult = client.authenticate(username, password); String ticket = authResult.getActorTicket();
ReadDocumentHeaderListResultType result = client.readDocumentHeaders( authResult.getActorTicket(), username, null, false);

Read a subset of active document headers within an indexed range

Reads the first three active document headers in a range as ordered by the specified Indexer. The indexer in this scenario orders all medications alphabetically by their name.

String username = "username@indivohealth.org";
String password = "password";
String indexerName = "MedicationNameIndexer"; AuthenticateResultType authResult = client.authenticate(username, password); String ticket = authResult.getActorTicket();
ReadHeadersInRangeResultType result = client.readDocumentHeadersInRange( authResult.getActorTicket(), username, indexerName, null, 3);

Read all active document headers within an indexed range

Reads all the active document headers in a range as ordered by the specified Indexer. The indexer in this scenario orders all medications alphabetically by their name.

String username = "username@indivohealth.org";
String password = "password";
String indexerName = "MedicationNameIndexer"; AuthenticateResultType authResult = client.authenticate(username, password); String ticket = authResult.getActorTicket();
ReadIndexerSizeResultType isResultType = client.readIndexerSize( authResult.getActorTicket(), username, indexerName);
int indexerSize = isResultType.getSize(); ReadHeadersInRangeResultType result = client.readDocumentHeadersInRange( authResult.getActorTicket(), username, indexerName, null, indexerSize);
Personal tools