Examples of HealthRecord


Examples of com.krminc.phr.domain.HealthRecord

     * @param newEntity the entity containing the new data
     * @return the updated entity
     */
    protected Height updateEntity(Height entity, Height newEntity) {
        EntityManager em = PersistenceService.getInstance().getEntityManager();
        HealthRecord hr = entity.getHealthRecord();
        HealthRecord hrNew = newEntity.getHealthRecord();
        entity = em.merge(newEntity);
        return entity;
    }
View Full Code Here

Examples of com.krminc.phr.domain.HealthRecord

     * @param newEntity the entity containing the new data
     * @return the updated entity
     */
    protected Allergy updateEntity(Allergy entity, Allergy newEntity) {
        EntityManager em = PersistenceService.getInstance().getEntityManager();
        HealthRecord hr = entity.getHealthRecord();
        HealthRecord hrNew = newEntity.getHealthRecord();
        entity = em.merge(newEntity);
        return entity;
    }
View Full Code Here

Examples of com.krminc.phr.domain.HealthRecord

     * Returns the resolved PeakFlow entity.
     *
     * @return an resolved entity
     */
    public PeakFlow resolveEntity(EntityManager em) {
        HealthRecord healthRecord = entity.getHealthRecord();
        if (healthRecord != null) {
            entity.setHealthRecord(em.getReference(HealthRecord.class, healthRecord.getHealthRecordId()));
        }
        return entity;
    }
View Full Code Here

Examples of com.krminc.phr.domain.HealthRecord

        EntityManager em = persistenceSvc.getEntityManager();
        try {
            return (HealthRecord) em.find(HealthRecord.class, healthRecordId);
        } catch (NoResultException ex) {
            logger.error("HealthRecord for id: {} does not exist.", healthRecordId, ex);
            return new HealthRecord();
//            try {
//                persistenceSvc.beginTx();
//                em.persist(user);
//                persistenceSvc.commitTx();
//            } finally {
View Full Code Here

Examples of com.krminc.phr.domain.HealthRecord

     * Returns the resolved Visit entity.
     *
     * @return an resolved entity
     */
    public Visit resolveEntity(EntityManager em) {
        HealthRecord healthRecord = entity.getHealthRecord();
        if (healthRecord != null) {
            entity.setHealthRecord(em.getReference(HealthRecord.class, healthRecord.getHealthRecordId()));
        }
        return entity;
    }
View Full Code Here

Examples of com.krminc.phr.domain.HealthRecord

     * Returns the resolved Exercise entity.
     *
     * @return an resolved entity
     */
    public Exercise resolveEntity(EntityManager em) {
        HealthRecord healthRecord = entity.getHealthRecord();
        if (healthRecord != null) {
            entity.setHealthRecord(em.getReference(HealthRecord.class, healthRecord.getHealthRecordId()));
        }
        return entity;
    }
View Full Code Here

Examples of com.krminc.phr.domain.HealthRecord

     * Returns the resolved MedicalEvent entity.
     *
     * @return an resolved entity
     */
    public MedicalEvent resolveEntity(EntityManager em) {
        HealthRecord healthRecord = entity.getHealthRecord();
        if (healthRecord != null) {
            entity.setHealthRecord(em.getReference(HealthRecord.class, healthRecord.getHealthRecordId()));
        }
        DataSource dataSource = entity.getDataSource();
        if (dataSource != null) {
            entity.setDataSource(em.getReference(DataSource.class, dataSource.getDataSourceId()));
        }
View Full Code Here

Examples of com.krminc.phr.domain.HealthRecord

    private URI uri;
    private int expandLevel;
 
    /** Creates a new instance of HealthRecordConverter */
    public HealthRecordConverter() {
        entity = new HealthRecord();
    }
View Full Code Here

Examples of com.krminc.phr.domain.HealthRecord

       
        PersistenceService persistenceSvc = PersistenceService.getInstance();
        try {
            persistenceSvc.beginTx();
            EntityManager em = persistenceSvc.getEntityManager();
            HealthRecord hr = em.find(HealthRecord.class, healthRecordId);
            UserPreferences preferences = hr.getPreferences();
           
            String username = req.getRemoteUser();
            boolean updateHRisRequired = false;
           
            if (preferences == null) {
                preferences = new UserPreferences(username);
                preferences.setShowCarenotebook(careNotebookVal);
                hr.setPreferences(preferences);
                updateHRisRequired = true;
            } else {
                preferences.setLastUpdatedUser(username);
                preferences.setShowCarenotebook(careNotebookVal);
            }
View Full Code Here

Examples of com.krminc.phr.domain.HealthRecord

     * Returns the resolved Medication entity.
     *
     * @return an resolved entity
     */
    public Medication resolveEntity(EntityManager em) {
        HealthRecord healthRecord = entity.getHealthRecord();
        if (healthRecord != null) {
            entity.setHealthRecord(em.getReference(HealthRecord.class, healthRecord.getHealthRecordId()));
        }
        return entity;
    }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.