PatientService |
[This is preliminary documentation and is subject to change.]
The PatientService web service contains web methods concerned with managing the patients in a specific configuration
The CreatePatient method creates new patients in the specified configuration.
public Patient CreatePatient(string config, Guid sessionGuid, Patient patient);
Get patient by database id
public Patient GetById(string config, Guid sessionGuid, int id);
Get patient by national identifier.
public Patient GetByNationalId(string config, Guid sessionGuid, string nationalId);
Get patient by custom SQL statement
public PatientCollection GetBySQL(string config, Guid sessionGuid, string sqlQuery);
Get the record tree as xml for a given patient identified by database id
public XmlDocument GetRecordTreeAsXML(string config, Guid sessionGuid, int patientId, string encodingName);
Get the record tree as for a given patient identified by database id
public RootRecordTreeNode GetRecordTree(string config, Guid sessionGuid, int patientId);
In the following example we login and create a patient on a specific configuration
// CreatePatient method example string config = "GOP"; // or "Projektdata" - name of configuration string domain = "1351"; // domain for the user we login with string username = "Admin1351"; // username for the user we login with string password = "secret"; // password for the user we login with //first we login with a user that can create other users LoginService loginService = new LoginService(); LogOnInfo logOnInfo = loginService.LogInPlainPassword(config, domain, username, password, false); if (logOnInfo.Status != LogOnStatus.Ok) return; // could not log on // then we create a patient object for the patient we wish to create Patient patient = new Patient(); patient.FirstName = "Ole"; // new patients firstname patient.Username = "Olesen": // new patients lastname patient.CprNr = "1234561234"; // new patients National id patient.Road = "Olesvej"; // name of road in new patients home address patient.HouseNum = "1"; // housnumber in new patients home address // and finally we create the new patient PatientService patientService = new PatientService(); patientService.CreatePatient(logOnInfo.ConfigName, logOnInfo.SessionGuid,patient);