@Path("info/")
@GET
@Produces({ MediaType.APPLICATION_JSON })
public JSONObject getPatientInfo() {
HealthRecord hr = null;
JSONObject jSONObject = new JSONObject();
PersistenceService persistenceSvc = PersistenceService.getInstance();
try {
persistenceSvc.beginTx();
hr = getEntity();
jSONObject.put("name", hr.getUser().getFullName());
jSONObject.put("gender", hr.getFullGender());
jSONObject.put("age", hr.getAge());
} catch (JSONException ex) {
} finally {
PersistenceService.getInstance().close();
}