NEUTRAL POINT SERVICE
Introduction
- The Linkcare Neutral Point (LC-NP) is a Linkcare service to allow mobile and web service clients to be able to log in to multiple Linkcare Servers.
- This feature makes possible to use a single App provider (i.e. google play) and avoid patients to be required to customise the system
- When a Linkcare client is started, the LC-NP returns a DNS-like list of all the available LC Servers were the patient is registered
- The Linkcare Neutral Point can also be installed as a Corporate Service, but in this case the health service provider must create a "white label" app, and patients will only be able to access the specific Health Care Service Provider with this "customised" app.
In this moment, the Linkcare Neutral Point Service is in https://mobile.linkcare.es/ws and/or https://patient.mobile.linkcare.es/ws
The most important function in the Linkcare Neutral Point Service is:
SESSION_DISCOVER WS FUNCTION
Returns, if logged in properly, the token and the user id (both needed to call protected methods), an endpoint and other user info.
Discussion
Remember that the endpoint you get from the output parameters can be totally different to the one used to call this function, and you should use the retrieved one for every new calls associated to that user.
If you still don't have a specific endpoint or you don't know to which endpoint your user is associated, you may use this method to login correctly. Otherwise simply use session_init
This method has the same input and output structure of session_init
Input Parameters
user | The username |
password | The password of the user |
IP | IP of the caller (the one who invokes this web service). If IP="", the system will try to determine automatically the remote connection IP |
host | The chosen identifier for the application (with its version) |
language | The language code in ISO format used by the device |
current_date | The actual date with hour and minutes in the local device in american format YYYY-mm-dd HH:mm:ss |
calendar | The type of calendar used by the device |
device | An unique and immutable ID for the device |
extra | Field with extra data (app version, OS version ej. {"app_version": 3.0.10, "android_version": 4.0.3} ) |
Output Parameters
token | The session ID, needed to call protected method |
user | The user ID (different from username), needed to call protected method |
WS | The URL web service endpoint |
language | Default language for the user |
name | The name of the user |
ErrorMsg | any fault in the call, either in the validation of input parameters, errors in the connection to the database or any other error, this parameter returns the error message produced |
Example
Request sample: | session_discover ( “user”, “password”, "127.0.0.1",); | |
Response sample: |
| |
Notes: |