Java 类ims.core.vo.lookups.DocumentCreationType 实例源码

项目:AvoinApotti    文件:Logic.java   
private String getStatus(PatientDocumentSearchListVo patientDocument) 
{
    if(patientDocument == null)
        return null;

    if(DocumentCreationType.IMPORTED.equals(patientDocument.getCreationType()) || DocumentCreationType.SCANNED.equals(patientDocument.getCreationType()))
        return IMPORTED;

    if(DocumentCategory.HISTORICAL.equals(patientDocument.getCategory()))
        return HISTORICAL;

    if(patientDocument.getCurrentDocumentStatusIsNotNull())
    {
        if(DocumentStatus.DRAFT.equals(patientDocument.getCurrentDocumentStatus().getCorrespondenceStatus())
            || DocumentStatus.FOR_REVIEW.equals(patientDocument.getCurrentDocumentStatus().getCorrespondenceStatus())
            ||DocumentStatus.FOR_UPDATE.equals(patientDocument.getCurrentDocumentStatus().getCorrespondenceStatus()))
        {
            return DRAFT;
        }
    }

    return COMPLETED;
}
项目:AvoinApotti    文件:DnaBatchUpdateImpl.java   
private PatientDocumentVo populatePatientDocumentVo(ServerDocumentVo serverDocumentVo, CatsReferralVo catReferral)
{
    PatientDocumentVo vo = new PatientDocumentVo();
    vo.setPatient(catReferral.getPatient());
    vo.setEpisodeofCare(null);
    vo.setCareContext(null);
    vo.setClinicalContact(null);
    vo.setReferral(null);

    vo.setName("Letter to patient DNA");
    vo.setServerDocument(serverDocumentVo);
    vo.setCreationType(DocumentCreationType.GENERATED);
    vo.setCategory(DocumentCategory.LETTER_TO_PATIENT_DNA);

    vo.setRecordingUser(null);
    vo.setRecordingDateTime(new DateTime());
    vo.setStatus(PreActiveActiveInactiveStatus.ACTIVE);
    return vo;
}
项目:AvoinApotti    文件:DischargeSummaryScheduleSTHKFormImpl.java   
private PatientDocumentVo populatePatientDocumentVo(PatientEdischargeBatchVo patVo, ServerDocumentVo serverDocumentVo, EDischargeSTHKSummaryVo summaryVo, String docName, DocumentCategory category)
{       
    if (summaryVo != null)
    {
        if (summaryVo.getCareContextIsNotNull())
        {
            PatientDocumentVo vo = new PatientDocumentVo();
            vo.setPatient(patVo);                   
            vo.setCareContext(summaryVo.getCareContext());                  

            vo.setName(docName);
            vo.setServerDocument(serverDocumentVo);
            vo.setCreationType(DocumentCreationType.GENERATED);                     
            vo.setCategory(category);

            vo.setRecordingUser(getMosUser() != null ? (MemberOfStaffLiteVo) getMosUser() : null);
            vo.setRecordingDateTime(new DateTime());
            vo.setStatus(PreActiveActiveInactiveStatus.ACTIVE);
            vo.setResponsibleHCP(getResponsibleHCPForCareContext(summaryVo.getCareContext()));

            return vo;                  
        }           
    }

    return null;    
}
项目:AvoinApotti    文件:Logic.java   
private PatientDocumentVo populatePatientDocument(ServerDocumentVo serverDocument, String documentName, DocumentCategory documentCategory)
{
    PatientDocumentVo document = new PatientDocumentVo();

    document.setPatient(domain.getPatientRef(form.getGlobalContext().RefMan.getCatsReferral()));
    document.setCareContext(domain.getCareContextRef(form.getGlobalContext().RefMan.getCatsReferral()));
    document.setEpisodeofCare(domain.getEpisodeOfCareRef(form.getGlobalContext().RefMan.getCatsReferral()));
    document.setReferral(null);

    document.setName(documentName);
    document.setServerDocument(serverDocument);
    document.setCreationType(DocumentCreationType.GENERATED);
    document.setCategory(documentCategory);

    document.setRecordingUser((MemberOfStaffRefVo) domain.getMosUser(engine.getLoggedInUser().getUsername()));
    document.setRecordingDateTime(new DateTime());
    document.setStatus(PreActiveActiveInactiveStatus.ACTIVE);

    return document;
}
项目:AvoinApotti    文件:Logic.java   
private PatientDocumentVo populatePatientDocumentVo(ServerDocumentVo serverDocumentVo, String patientDocumentName, DocumentCategory patientDocumentCategory)
{
    PatientDocumentVo vo = new PatientDocumentVo();
    vo.setPatient(form.getGlobalContext().Core.getPatientShort());
    vo.setEpisodeofCare(form.getGlobalContext().Core.getEpisodeofCareShort());
    vo.setCareContext(form.getGlobalContext().Core.getCurrentCareContext());
    vo.setClinicalContact(form.getGlobalContext().Core.getCurrentClinicalContact());
    vo.setReferral(null);

    vo.setName(patientDocumentName);
    vo.setServerDocument(serverDocumentVo);
    vo.setCreationType(DocumentCreationType.GENERATED);
    vo.setCategory(patientDocumentCategory);

    vo.setRecordingUser((MemberOfStaffRefVo)domain.getMosUser(engine.getLoggedInUser().getUsername()));
    vo.setRecordingDateTime(new DateTime());
    vo.setStatus(PreActiveActiveInactiveStatus.ACTIVE);
    return vo;
}
项目:AvoinApotti    文件:Logic.java   
private PatientDocumentVo populatePatientDocument(ServerDocumentVo serverDocument, String documentName, DocumentCategory documentCategory)
{
    PatientDocumentVo document = new PatientDocumentVo();

    document.setPatient(domain.getPatientRef(form.getGlobalContext().RefMan.getCatsReferral()));
    document.setCareContext(domain.getCareContextRef(form.getGlobalContext().RefMan.getCatsReferral()));
    document.setEpisodeofCare(domain.getEpisodeOfCareRef(form.getGlobalContext().RefMan.getCatsReferral()));
    document.setReferral(null);

    document.setName(documentName);
    document.setServerDocument(serverDocument);
    document.setCreationType(DocumentCreationType.GENERATED);
    document.setCategory(documentCategory);

    document.setRecordingUser((MemberOfStaffRefVo) domain.getMosUser(engine.getLoggedInUser().getUsername()));
    document.setRecordingDateTime(new DateTime());
    document.setStatus(PreActiveActiveInactiveStatus.ACTIVE);

    return document;
}
项目:AvoinApotti    文件:Logic.java   
private PatientDocumentVo populatePatientDocumentVo(ServerDocumentVo serverDocumentVo, String patientDocumentName, DocumentCategory patientDocumentCategory)
{
    PatientDocumentVo vo = new PatientDocumentVo();
    vo.setPatient(form.getGlobalContext().Core.getPatientShort());
    vo.setEpisodeofCare(form.getGlobalContext().Core.getEpisodeofCareShort());
    vo.setCareContext(form.getGlobalContext().Core.getCurrentCareContext());
    vo.setClinicalContact(form.getGlobalContext().Core.getCurrentClinicalContact());
    vo.setReferral(null);

    vo.setName(patientDocumentName);
    vo.setServerDocument(serverDocumentVo);
    vo.setCreationType(DocumentCreationType.GENERATED);
    vo.setCategory(patientDocumentCategory);

    vo.setRecordingUser((MemberOfStaffRefVo)domain.getMosUser(engine.getLoggedInUser().getUsername()));
    vo.setRecordingDateTime(new DateTime());
    vo.setStatus(PreActiveActiveInactiveStatus.ACTIVE);
    return vo;
}
项目:AvoinApotti    文件:Logic.java   
private PatientDocumentVo populatePatientDocumentVo(ServerDocumentVo serverDocumentVo, String patientDocumentName, DocumentCategory patientDocumentCategory)
{
    PatientDocumentVo vo = new PatientDocumentVo();
    vo.setPatient(form.getGlobalContext().Core.getPatientShort());
    vo.setEpisodeofCare(form.getGlobalContext().Core.getEpisodeofCareShort());
    vo.setCareContext(form.getGlobalContext().Core.getCurrentCareContext());
    vo.setClinicalContact(form.getGlobalContext().Core.getCurrentClinicalContact());
    vo.setReferral(null);

    vo.setName(patientDocumentName);
    vo.setServerDocument(serverDocumentVo);
    vo.setCreationType(DocumentCreationType.GENERATED);
    vo.setCategory(patientDocumentCategory);

    vo.setRecordingUser((MemberOfStaffRefVo) domain.getMosUser(engine.getLoggedInUser().getUsername()));
    vo.setRecordingDateTime(new DateTime());
    vo.setStatus(PreActiveActiveInactiveStatus.ACTIVE);
    return vo;
}
项目:openMAXIMS    文件:Logic.java   
private String getStatus(PatientDocumentSearchListVo patientDocument) 
{
    if(patientDocument == null)
        return null;

    if(DocumentCreationType.IMPORTED.equals(patientDocument.getCreationType()) || DocumentCreationType.SCANNED.equals(patientDocument.getCreationType()))
        return IMPORTED;

    if(DocumentCategory.HISTORICAL.equals(patientDocument.getCategory()))
        return HISTORICAL;

    if(patientDocument.getCurrentDocumentStatusIsNotNull())
    {
        if(DocumentStatus.DRAFT.equals(patientDocument.getCurrentDocumentStatus().getCorrespondenceStatus())
            || DocumentStatus.FOR_REVIEW.equals(patientDocument.getCurrentDocumentStatus().getCorrespondenceStatus())
            ||DocumentStatus.FOR_UPDATE.equals(patientDocument.getCurrentDocumentStatus().getCorrespondenceStatus()))
        {
            return DRAFT;
        }
    }

    return COMPLETED;
}
项目:openMAXIMS    文件:DnaBatchUpdateImpl.java   
private PatientDocumentVo populatePatientDocumentVo(ServerDocumentVo serverDocumentVo, CatsReferralVo catReferral)
{
    PatientDocumentVo vo = new PatientDocumentVo();
    vo.setPatient(catReferral.getPatient());
    vo.setEpisodeofCare(null);
    vo.setCareContext(null);
    vo.setClinicalContact(null);
    vo.setReferral(null);

    vo.setName("Letter to patient DNA");
    vo.setServerDocument(serverDocumentVo);
    vo.setCreationType(DocumentCreationType.GENERATED);
    vo.setCategory(DocumentCategory.LETTER_TO_PATIENT_DNA);

    vo.setRecordingUser(null);
    vo.setRecordingDateTime(new DateTime());
    vo.setStatus(PreActiveActiveInactiveStatus.ACTIVE);
    return vo;
}
项目:openMAXIMS    文件:DischargeSummaryScheduleSTHKFormImpl.java   
private PatientDocumentVo populatePatientDocumentVo(PatientEdischargeBatchVo patVo, ServerDocumentVo serverDocumentVo, EDischargeSTHKSummaryVo summaryVo, String docName, DocumentCategory category)
{       
    if (summaryVo != null)
    {
        if (summaryVo.getCareContextIsNotNull())
        {
            PatientDocumentVo vo = new PatientDocumentVo();
            vo.setPatient(patVo);                   
            vo.setCareContext(summaryVo.getCareContext());                  

            vo.setName(docName);
            vo.setServerDocument(serverDocumentVo);
            vo.setCreationType(DocumentCreationType.GENERATED);                     
            vo.setCategory(category);

            vo.setRecordingUser(getMosUser() != null ? (MemberOfStaffLiteVo) getMosUser() : null);
            vo.setRecordingDateTime(new DateTime());
            vo.setStatus(PreActiveActiveInactiveStatus.ACTIVE);
            vo.setResponsibleHCP(getResponsibleHCPForCareContext(summaryVo.getCareContext()));

            return vo;                  
        }           
    }

    return null;    
}
项目:openMAXIMS    文件:Logic.java   
private PatientDocumentVo populatePatientDocument(ServerDocumentVo serverDocument, String documentName, DocumentCategory documentCategory)
{
    PatientDocumentVo document = new PatientDocumentVo();

    document.setPatient(domain.getPatientRef(form.getGlobalContext().RefMan.getCatsReferral()));
    document.setCareContext(domain.getCareContextRef(form.getGlobalContext().RefMan.getCatsReferral()));
    document.setEpisodeofCare(domain.getEpisodeOfCareRef(form.getGlobalContext().RefMan.getCatsReferral()));
    document.setReferral(null);

    document.setName(documentName);
    document.setServerDocument(serverDocument);
    document.setCreationType(DocumentCreationType.GENERATED);
    document.setCategory(documentCategory);

    document.setRecordingUser((MemberOfStaffRefVo) domain.getMosUser(engine.getLoggedInUser().getUsername()));
    document.setRecordingDateTime(new DateTime());
    document.setStatus(PreActiveActiveInactiveStatus.ACTIVE);

    return document;
}
项目:openMAXIMS    文件:Logic.java   
private PatientDocumentVo populatePatientDocumentVo(ServerDocumentVo serverDocumentVo, String patientDocumentName, DocumentCategory patientDocumentCategory)
{
    PatientDocumentVo vo = new PatientDocumentVo();
    vo.setPatient(form.getGlobalContext().Core.getPatientShort());
    vo.setEpisodeofCare(form.getGlobalContext().Core.getEpisodeofCareShort());
    vo.setCareContext(form.getGlobalContext().Core.getCurrentCareContext());
    vo.setClinicalContact(form.getGlobalContext().Core.getCurrentClinicalContact());
    vo.setReferral(null);

    vo.setName(patientDocumentName);
    vo.setServerDocument(serverDocumentVo);
    vo.setCreationType(DocumentCreationType.GENERATED);
    vo.setCategory(patientDocumentCategory);

    vo.setRecordingUser((MemberOfStaffRefVo)domain.getMosUser(engine.getLoggedInUser().getUsername()));
    vo.setRecordingDateTime(new DateTime());
    vo.setStatus(PreActiveActiveInactiveStatus.ACTIVE);
    return vo;
}
项目:openMAXIMS    文件:Logic.java   
private PatientDocumentVo populatePatientDocument(ServerDocumentVo serverDocument, String documentName, DocumentCategory documentCategory)
{
    PatientDocumentVo document = new PatientDocumentVo();

    document.setPatient(domain.getPatientRef(form.getGlobalContext().RefMan.getCatsReferral()));
    document.setCareContext(domain.getCareContextRef(form.getGlobalContext().RefMan.getCatsReferral()));
    document.setEpisodeofCare(domain.getEpisodeOfCareRef(form.getGlobalContext().RefMan.getCatsReferral()));
    document.setReferral(null);

    document.setName(documentName);
    document.setServerDocument(serverDocument);
    document.setCreationType(DocumentCreationType.GENERATED);
    document.setCategory(documentCategory);

    document.setRecordingUser((MemberOfStaffRefVo) domain.getMosUser(engine.getLoggedInUser().getUsername()));
    document.setRecordingDateTime(new DateTime());
    document.setStatus(PreActiveActiveInactiveStatus.ACTIVE);

    return document;
}
项目:openMAXIMS    文件:Logic.java   
private PatientDocumentVo populatePatientDocumentVo(ServerDocumentVo serverDocumentVo, String patientDocumentName, DocumentCategory patientDocumentCategory)
{
    PatientDocumentVo vo = new PatientDocumentVo();
    vo.setPatient(form.getGlobalContext().Core.getPatientShort());
    vo.setEpisodeofCare(form.getGlobalContext().Core.getEpisodeofCareShort());
    vo.setCareContext(form.getGlobalContext().Core.getCurrentCareContext());
    vo.setClinicalContact(form.getGlobalContext().Core.getCurrentClinicalContact());
    vo.setReferral(null);

    vo.setName(patientDocumentName);
    vo.setServerDocument(serverDocumentVo);
    vo.setCreationType(DocumentCreationType.GENERATED);
    vo.setCategory(patientDocumentCategory);

    vo.setRecordingUser((MemberOfStaffRefVo)domain.getMosUser(engine.getLoggedInUser().getUsername()));
    vo.setRecordingDateTime(new DateTime());
    vo.setStatus(PreActiveActiveInactiveStatus.ACTIVE);
    return vo;
}
项目:openMAXIMS    文件:Logic.java   
private PatientDocumentVo populatePatientDocumentVo(ServerDocumentVo serverDocumentVo, String patientDocumentName, DocumentCategory patientDocumentCategory)
{
    PatientDocumentVo vo = new PatientDocumentVo();
    vo.setPatient(form.getGlobalContext().Core.getPatientShort());
    vo.setEpisodeofCare(form.getGlobalContext().Core.getEpisodeofCareShort());
    vo.setCareContext(form.getGlobalContext().Core.getCurrentCareContext());
    vo.setClinicalContact(form.getGlobalContext().Core.getCurrentClinicalContact());
    vo.setReferral(null);

    vo.setName(patientDocumentName);
    vo.setServerDocument(serverDocumentVo);
    vo.setCreationType(DocumentCreationType.GENERATED);
    vo.setCategory(patientDocumentCategory);

    vo.setRecordingUser((MemberOfStaffRefVo) domain.getMosUser(engine.getLoggedInUser().getUsername()));
    vo.setRecordingDateTime(new DateTime());
    vo.setStatus(PreActiveActiveInactiveStatus.ACTIVE);
    return vo;
}
项目:openMAXIMS    文件:Logic.java   
private String getStatus(PatientDocumentSearchListVo patientDocument) 
{
    if(patientDocument == null)
        return null;

    if(DocumentCreationType.IMPORTED.equals(patientDocument.getCreationType()) || DocumentCreationType.SCANNED.equals(patientDocument.getCreationType()))
        return IMPORTED;

    if(DocumentCategory.HISTORICAL.equals(patientDocument.getCategory()))
        return HISTORICAL;

    if(patientDocument.getCurrentDocumentStatusIsNotNull())
    {
        if(DocumentStatus.DRAFT.equals(patientDocument.getCurrentDocumentStatus().getCorrespondenceStatus())
            || DocumentStatus.FOR_REVIEW.equals(patientDocument.getCurrentDocumentStatus().getCorrespondenceStatus())
            ||DocumentStatus.FOR_UPDATE.equals(patientDocument.getCurrentDocumentStatus().getCorrespondenceStatus()))
        {
            return DRAFT;
        }
    }

    return COMPLETED;
}
项目:openMAXIMS    文件:DnaBatchUpdateImpl.java   
private PatientDocumentVo populatePatientDocumentVo(ServerDocumentVo serverDocumentVo, CatsReferralVo catReferral)
{
    PatientDocumentVo vo = new PatientDocumentVo();
    vo.setPatient(catReferral.getPatient());
    vo.setEpisodeofCare(null);
    vo.setCareContext(null);
    vo.setClinicalContact(null);
    vo.setReferral(null);

    vo.setName("Letter to patient DNA");
    vo.setServerDocument(serverDocumentVo);
    vo.setCreationType(DocumentCreationType.GENERATED);
    vo.setCategory(DocumentCategory.LETTER_TO_PATIENT_DNA);

    vo.setRecordingUser(null);
    vo.setRecordingDateTime(new DateTime());
    vo.setStatus(PreActiveActiveInactiveStatus.ACTIVE);
    return vo;
}
项目:openMAXIMS    文件:DischargeSummaryScheduleSTHKFormImpl.java   
private PatientDocumentVo populatePatientDocumentVo(PatientEdischargeBatchVo patVo, ServerDocumentVo serverDocumentVo, EDischargeSTHKSummaryVo summaryVo, String docName, DocumentCategory category)
{       
    if (summaryVo != null)
    {
        if (summaryVo.getCareContextIsNotNull())
        {
            PatientDocumentVo vo = new PatientDocumentVo();
            vo.setPatient(patVo);                   
            vo.setCareContext(summaryVo.getCareContext());                  

            vo.setName(docName);
            vo.setServerDocument(serverDocumentVo);
            vo.setCreationType(DocumentCreationType.GENERATED);                     
            vo.setCategory(category);

            vo.setRecordingUser(getMosUser() != null ? (MemberOfStaffLiteVo) getMosUser() : null);
            vo.setRecordingDateTime(new DateTime());
            vo.setStatus(PreActiveActiveInactiveStatus.ACTIVE);
            vo.setResponsibleHCP(getResponsibleHCPForCareContext(summaryVo.getCareContext()));

            return vo;                  
        }           
    }

    return null;    
}
项目:openMAXIMS    文件:Logic.java   
private PatientDocumentVo populatePatientDocument(ServerDocumentVo serverDocument, String documentName, DocumentCategory documentCategory)
{
    PatientDocumentVo document = new PatientDocumentVo();

    document.setPatient(domain.getPatientRef(form.getGlobalContext().RefMan.getCatsReferral()));
    document.setCareContext(domain.getCareContextRef(form.getGlobalContext().RefMan.getCatsReferral()));
    document.setEpisodeofCare(domain.getEpisodeOfCareRef(form.getGlobalContext().RefMan.getCatsReferral()));
    document.setReferral(null);

    document.setName(documentName);
    document.setServerDocument(serverDocument);
    document.setCreationType(DocumentCreationType.GENERATED);
    document.setCategory(documentCategory);

    document.setRecordingUser((MemberOfStaffRefVo) domain.getMosUser(engine.getLoggedInUser().getUsername()));
    document.setRecordingDateTime(new DateTime());
    document.setStatus(PreActiveActiveInactiveStatus.ACTIVE);

    return document;
}
项目:openMAXIMS    文件:Logic.java   
private PatientDocumentVo populatePatientDocumentVo(ServerDocumentVo serverDocumentVo, String patientDocumentName, DocumentCategory patientDocumentCategory)
{
    PatientDocumentVo vo = new PatientDocumentVo();
    vo.setPatient(form.getGlobalContext().Core.getPatientShort());
    vo.setEpisodeofCare(form.getGlobalContext().Core.getEpisodeofCareShort());
    vo.setCareContext(form.getGlobalContext().Core.getCurrentCareContext());
    vo.setClinicalContact(form.getGlobalContext().Core.getCurrentClinicalContact());
    vo.setReferral(null);

    vo.setName(patientDocumentName);
    vo.setServerDocument(serverDocumentVo);
    vo.setCreationType(DocumentCreationType.GENERATED);
    vo.setCategory(patientDocumentCategory);

    vo.setRecordingUser((MemberOfStaffRefVo)domain.getMosUser(engine.getLoggedInUser().getUsername()));
    vo.setRecordingDateTime(new DateTime());
    vo.setStatus(PreActiveActiveInactiveStatus.ACTIVE);
    return vo;
}
项目:openMAXIMS    文件:Logic.java   
private PatientDocumentVo populatePatientDocument(ServerDocumentVo serverDocument, String documentName, DocumentCategory documentCategory)
{
    PatientDocumentVo document = new PatientDocumentVo();

    document.setPatient(domain.getPatientRef(form.getGlobalContext().RefMan.getCatsReferral()));
    document.setCareContext(domain.getCareContextRef(form.getGlobalContext().RefMan.getCatsReferral()));
    document.setEpisodeofCare(domain.getEpisodeOfCareRef(form.getGlobalContext().RefMan.getCatsReferral()));
    document.setReferral(null);

    document.setName(documentName);
    document.setServerDocument(serverDocument);
    document.setCreationType(DocumentCreationType.GENERATED);
    document.setCategory(documentCategory);

    document.setRecordingUser((MemberOfStaffRefVo) domain.getMosUser(engine.getLoggedInUser().getUsername()));
    document.setRecordingDateTime(new DateTime());
    document.setStatus(PreActiveActiveInactiveStatus.ACTIVE);

    return document;
}
项目:openMAXIMS    文件:Logic.java   
private PatientDocumentVo populatePatientDocumentVo(ServerDocumentVo serverDocumentVo, String patientDocumentName, DocumentCategory patientDocumentCategory)
{
    PatientDocumentVo vo = new PatientDocumentVo();
    vo.setPatient(form.getGlobalContext().Core.getPatientShort());
    vo.setEpisodeofCare(form.getGlobalContext().Core.getEpisodeofCareShort());
    vo.setCareContext(form.getGlobalContext().Core.getCurrentCareContext());
    vo.setClinicalContact(form.getGlobalContext().Core.getCurrentClinicalContact());
    vo.setReferral(null);

    vo.setName(patientDocumentName);
    vo.setServerDocument(serverDocumentVo);
    vo.setCreationType(DocumentCreationType.GENERATED);
    vo.setCategory(patientDocumentCategory);

    vo.setRecordingUser((MemberOfStaffRefVo)domain.getMosUser(engine.getLoggedInUser().getUsername()));
    vo.setRecordingDateTime(new DateTime());
    vo.setStatus(PreActiveActiveInactiveStatus.ACTIVE);
    return vo;
}
项目:openMAXIMS    文件:Logic.java   
private PatientDocumentVo populatePatientDocumentVo(ServerDocumentVo serverDocumentVo, String patientDocumentName, DocumentCategory patientDocumentCategory)
{
    PatientDocumentVo vo = new PatientDocumentVo();
    vo.setPatient(form.getGlobalContext().Core.getPatientShort());
    vo.setEpisodeofCare(form.getGlobalContext().Core.getEpisodeofCareShort());
    vo.setCareContext(form.getGlobalContext().Core.getCurrentCareContext());
    vo.setClinicalContact(form.getGlobalContext().Core.getCurrentClinicalContact());
    vo.setReferral(null);

    vo.setName(patientDocumentName);
    vo.setServerDocument(serverDocumentVo);
    vo.setCreationType(DocumentCreationType.GENERATED);
    vo.setCategory(patientDocumentCategory);

    vo.setRecordingUser((MemberOfStaffRefVo) domain.getMosUser(engine.getLoggedInUser().getUsername()));
    vo.setRecordingDateTime(new DateTime());
    vo.setStatus(PreActiveActiveInactiveStatus.ACTIVE);
    return vo;
}
项目:openmaxims-linux    文件:Logic.java   
private String getStatus(PatientDocumentSearchListVo patientDocument) 
{
    if(patientDocument == null)
        return null;

    if(DocumentCreationType.IMPORTED.equals(patientDocument.getCreationType()) || DocumentCreationType.SCANNED.equals(patientDocument.getCreationType()))
        return IMPORTED;

    if(DocumentCategory.HISTORICAL.equals(patientDocument.getCategory()))
        return HISTORICAL;

    if(patientDocument.getCurrentDocumentStatusIsNotNull())
    {
        if(DocumentStatus.DRAFT.equals(patientDocument.getCurrentDocumentStatus().getCorrespondenceStatus())
            || DocumentStatus.FOR_REVIEW.equals(patientDocument.getCurrentDocumentStatus().getCorrespondenceStatus())
            ||DocumentStatus.FOR_UPDATE.equals(patientDocument.getCurrentDocumentStatus().getCorrespondenceStatus()))
        {
            return DRAFT;
        }
    }

    return COMPLETED;
}
项目:openmaxims-linux    文件:DnaBatchUpdateImpl.java   
private PatientDocumentVo populatePatientDocumentVo(ServerDocumentVo serverDocumentVo, CatsReferralVo catReferral)
{
    PatientDocumentVo vo = new PatientDocumentVo();
    vo.setPatient(catReferral.getPatient());
    vo.setEpisodeofCare(null);
    vo.setCareContext(null);
    vo.setClinicalContact(null);
    vo.setReferral(null);

    vo.setName("Letter to patient DNA");
    vo.setServerDocument(serverDocumentVo);
    vo.setCreationType(DocumentCreationType.GENERATED);
    vo.setCategory(DocumentCategory.LETTER_TO_PATIENT_DNA);

    vo.setRecordingUser(null);
    vo.setRecordingDateTime(new DateTime());
    vo.setStatus(PreActiveActiveInactiveStatus.ACTIVE);
    return vo;
}
项目:openmaxims-linux    文件:DischargeSummaryScheduleSTHKFormImpl.java   
private PatientDocumentVo populatePatientDocumentVo(PatientEdischargeBatchVo patVo, ServerDocumentVo serverDocumentVo, EDischargeSTHKSummaryVo summaryVo, String docName, DocumentCategory category)
{       
    if (summaryVo != null)
    {
        if (summaryVo.getCareContextIsNotNull())
        {
            PatientDocumentVo vo = new PatientDocumentVo();
            vo.setPatient(patVo);                   
            vo.setCareContext(summaryVo.getCareContext());                  

            vo.setName(docName);
            vo.setServerDocument(serverDocumentVo);
            vo.setCreationType(DocumentCreationType.GENERATED);                     
            vo.setCategory(category);

            vo.setRecordingUser(getMosUser() != null ? (MemberOfStaffLiteVo) getMosUser() : null);
            vo.setRecordingDateTime(new DateTime());
            vo.setStatus(PreActiveActiveInactiveStatus.ACTIVE);
            vo.setResponsibleHCP(getResponsibleHCPForCareContext(summaryVo.getCareContext()));

            return vo;                  
        }           
    }

    return null;    
}
项目:openMAXIMS    文件:PatientClinicalNotesforEvolveIngestionJobImpl.java   
private PatientDocumentVo populatePatientDocument(PatientRefVo patientRef, MemberOfStaffRefVo mosRefVo) throws Exception
{
    if(patientRef == null)
        return null;

    PatientDocumentVo vo = new PatientDocumentVo();

    vo.setPatient(patientRef);                  

    vo.setDocumentDate(new ims.framework.utils.Date());
    vo.setName("Patient Clinical Notes Batch Report");
    vo.setServerDocument(populateServerDocument());
    vo.setCreationType(DocumentCreationType.GENERATED);                     
    vo.setCategory(DocumentCategory.CLINICAL_NOTES);

    vo.setRecordingDateTime(new DateTime());
    vo.setStatus(PreActiveActiveInactiveStatus.ACTIVE);

    PatientDocumentStatusVo status = new PatientDocumentStatusVo();
    status.setCorrespondenceStatus(DocumentStatus.COMPLETED);
    status.setRecordingUser(mosRefVo);
    status.setRecordingDateTime(new DateTime());

    vo.setCurrentDocumentStatus(status);
    vo.setDocumentStatusHistory(new PatientDocumentStatusVoCollection());//wdev-19898
    vo.getDocumentStatusHistory().add(status);//wdev-19898

    vo.setRecordingUser(mosRefVo);//wdev-19898
    vo.setRecordingDateTime(new DateTime());//wdev-19898
    vo.setAuthoringHCP(getHcpForMosRef(mosRefVo));//wdev-19898
    vo.setAuthoringDateTime(new DateTime());//wdev-19898

    return vo;  
}
项目:openMAXIMS    文件:EDDischargeDetailsJobImpl.java   
private PatientDocumentVo populatePatientDocument(TrackingJobVo tracking) 
{
    if(tracking == null)
        return null;

    PatientDocumentVo vo = new PatientDocumentVo();

    vo.setPatient(tracking.getPatient());                   
    vo.setCareContext(tracking.getAttendance() != null ? tracking.getAttendance().getCareContext() : null); 
    vo.setEpisodeofCare(tracking.getEpisode() != null ? tracking.getEpisode().getEpisodeOfCare() : null);
    vo.setSpecialty((tracking.getEpisode() != null && tracking.getEpisode().getEpisodeOfCare() != null) ? tracking.getEpisode().getEpisodeOfCare().getSpecialty() : null);

    vo.setResponsibleHCP((tracking.getEpisode() != null && tracking.getEpisode().getEpisodeOfCare() != null) ? tracking.getEpisode().getEpisodeOfCare().getResponsibleHCP() : null);

    vo.setDocumentDate((tracking.getAttendance() != null && tracking.getAttendance().getCareContext() != null && tracking.getAttendance().getCareContext().getStartDateTime() != null) ? tracking.getAttendance().getCareContext().getStartDateTime().getDate() : null);

    if(vo.getDocumentDate() == null)
    {
        vo.setDocumentDate(new ims.framework.utils.Date());
    }

    vo.setName("ED Discharge Summary Report");
    vo.setServerDocument(populateServerDocument());
    vo.setCreationType(DocumentCreationType.GENERATED);                     
    vo.setCategory(DocumentCategory.DISCHARGE_REPORTS);

    //vo.setRecordingUser(getMosUser() != null ? (MemberOfStaffLiteVo) getMosUser() : null);
    vo.setRecordingDateTime(new DateTime());
    vo.setStatus(PreActiveActiveInactiveStatus.ACTIVE);

    return vo;                  
}
项目:openMAXIMS    文件:EDEmpDischargeDetailsJobImpl.java   
private PatientDocumentVo populatePatientDocument(TrackingJobVo tracking) 
{
    if(tracking == null)
        return null;

    PatientDocumentVo vo = new PatientDocumentVo();

    vo.setPatient(tracking.getPatient());                   
    vo.setCareContext(tracking.getAttendance() != null ? tracking.getAttendance().getCareContext() : null); 
    vo.setEpisodeofCare(tracking.getEpisode() != null ? tracking.getEpisode().getEpisodeOfCare() : null);
    vo.setSpecialty((tracking.getEpisode() != null && tracking.getEpisode().getEpisodeOfCare() != null) ? tracking.getEpisode().getEpisodeOfCare().getSpecialty() : null);

    vo.setResponsibleHCP((tracking.getEpisode() != null && tracking.getEpisode().getEpisodeOfCare() != null) ? tracking.getEpisode().getEpisodeOfCare().getResponsibleHCP() : null);

    vo.setDocumentDate((tracking.getAttendance() != null && tracking.getAttendance().getCareContext() != null && tracking.getAttendance().getCareContext().getStartDateTime() != null) ? tracking.getAttendance().getCareContext().getStartDateTime().getDate() : null);

    if(vo.getDocumentDate() == null)
    {
        vo.setDocumentDate(new ims.framework.utils.Date());
    }

    vo.setName("ED Discharge Summary Report");
    vo.setServerDocument(populateServerDocument());
    vo.setCreationType(DocumentCreationType.GENERATED);                     
    vo.setCategory(DocumentCategory.DISCHARGE_REPORTS);

    //vo.setRecordingUser(getMosUser() != null ? (MemberOfStaffLiteVo) getMosUser() : null);
    vo.setRecordingDateTime(new DateTime());
    vo.setStatus(PreActiveActiveInactiveStatus.ACTIVE);

    return vo;                  
}
项目:openMAXIMS    文件:EDSupplementaryDischargeLetterJobImpl.java   
private PatientDocumentVo populatePatientDocument(TrackingJobVo tracking, MemberOfStaffRefVo mosRefVo) 
{
    if(tracking == null)
        return null;

    PatientDocumentVo vo = new PatientDocumentVo();

    vo.setPatient(tracking.getPatient());                   
    vo.setCareContext(tracking.getAttendance() != null ? tracking.getAttendance().getCareContext() : null); 
    vo.setEpisodeofCare(tracking.getEpisode() != null ? tracking.getEpisode().getEpisodeOfCare() : null);
    vo.setSpecialty((tracking.getEpisode() != null && tracking.getEpisode().getEpisodeOfCare() != null) ? tracking.getEpisode().getEpisodeOfCare().getSpecialty() : null);

    vo.setResponsibleHCP((tracking.getEpisode() != null && tracking.getEpisode().getEpisodeOfCare() != null) ? tracking.getEpisode().getEpisodeOfCare().getResponsibleHCP() : null);

    vo.setDocumentDate((tracking.getAttendance() != null && tracking.getAttendance().getCareContext() != null && tracking.getAttendance().getCareContext().getStartDateTime() != null) ? tracking.getAttendance().getCareContext().getStartDateTime().getDate() : null);

    if(vo.getDocumentDate() == null)
    {
        vo.setDocumentDate(new ims.framework.utils.Date());
    }

    vo.setName("ED Discharge Supplementary Report"  + ((tracking.getPatient() != null && tracking.getPatient().getName() != null) ? " - " + tracking.getPatient().getName().toString() : ""));
    vo.setServerDocument(populateServerDocument());
    vo.setCreationType(DocumentCreationType.GENERATED);                     
    vo.setCategory(DocumentCategory.DISCHARGE_SUPPLEMENTARY);

    if (mosRefVo != null)
    {
        vo.setRecordingUser(mosRefVo);
        vo.setAuthoringHCP(getHcpForMosRef(mosRefVo));
        vo.setAuthoringDateTime(new DateTime());
    }

    vo.setRecordingDateTime(new DateTime());                
    vo.setStatus(PreActiveActiveInactiveStatus.ACTIVE);

    return vo;                  
}
项目:openMAXIMS    文件:DischargeSummaryScheduleSTHKImpl.java   
private PatientDocumentVo populatePatientDocumentVo(ServerDocumentVo serverDocumentVo, EDischargeSTHKSummaryVo summaryVo, String docName, DocumentCategory category)
{       
    if (summaryVo != null)
    {
        if (summaryVo.getCareContextIsNotNull())
        {
            PatientLiteVo patient = getPatientByCareContext(summaryVo.getCareContext());

            if (patient != null)
            {
                PatientDocumentVo vo = new PatientDocumentVo();
                vo.setPatient(patient);                 
                vo.setCareContext(summaryVo.getCareContext());                  

                vo.setName(docName);
                vo.setServerDocument(serverDocumentVo);
                vo.setCreationType(DocumentCreationType.GENERATED);                     
                vo.setCategory(category);

                vo.setRecordingUser(getMosUser() != null ? (MemberOfStaffLiteVo) getMosUser() : null);
                vo.setRecordingDateTime(new DateTime());
                vo.setStatus(PreActiveActiveInactiveStatus.ACTIVE);

                return vo;                  
            }               
        }           
    }

    return null;    
}
项目:openMAXIMS    文件:Logic.java   
private PatientDocumentForClinicalReferralVo createPatientDocument() 
{
    String fileName = createAndUploadDocument();

    if(fileName != null)
    {
        PatientDocumentForClinicalReferralVo rejectionDocument = new PatientDocumentForClinicalReferralVo();

        rejectionDocument.setName(INTERNAL_REFERRAL_REJECTION_DOCUMENT_NAME);
        rejectionDocument.setPatient(form.getGlobalContext().Core.getPatientShort());
        rejectionDocument.setCreationType(DocumentCreationType.GENERATED);
        rejectionDocument.setStatus(PreActiveActiveInactiveStatus.ACTIVE);
        rejectionDocument.setCategory(DocumentCategory.REJECTIONS);

        rejectionDocument.setRecordingUser(form.qmbRecordingUser().getValue());
        rejectionDocument.setRecordingDateTime(new DateTime());

        rejectionDocument.setDocumentDate(new Date());

        ServerDocumentVo doc = new ServerDocumentVo();
        doc.setFileName(fileName);
        doc.setFileType(FileType.PDF);

        rejectionDocument.setServerDocument(doc);

        return rejectionDocument;
    }

    return null;
}
项目:openMAXIMS    文件:Logic.java   
private PatientDocumentForClinicalReferralVo createPatientDocument() 
{
    String fileName = createAndUploadDocument();

    if(fileName != null)
    {
        PatientDocumentForClinicalReferralVo completionDocument = new PatientDocumentForClinicalReferralVo();

        completionDocument.setName(INTERNAL_REFERRAL_COMPLETION_DOCUMENT_NAME);
        completionDocument.setPatient(form.getGlobalContext().Core.getPatientShort());
        completionDocument.setCreationType(DocumentCreationType.GENERATED);
        completionDocument.setStatus(PreActiveActiveInactiveStatus.ACTIVE);
        completionDocument.setCategory(DocumentCategory.INTERNAL_REFERRALS);

        Object user = domain.getMosUser();

        if(user instanceof MemberOfStaffLiteVo)
        {
            MemberOfStaffLiteVo mosUser = (MemberOfStaffLiteVo) user;
            completionDocument.setRecordingUser(mosUser);   
        }

        completionDocument.setRecordingDateTime(new DateTime());

        completionDocument.setDocumentDate(new Date());

        ServerDocumentVo doc = new ServerDocumentVo();
        doc.setFileName(fileName);
        doc.setFileType(FileType.PDF);

        completionDocument.setServerDocument(doc);

        return completionDocument;
    }

    return null;
}
项目:AvoinApotti    文件:Logic.java   
private PatientDocumentForRACPCSummaryVo populatePatientDocument() 
{
    String fileName = createAndUploadDocument();

    if(fileName != null)
    {
        PatientDocumentForRACPCSummaryVo summaryDocument = new PatientDocumentForRACPCSummaryVo();

        summaryDocument.setName(SUMMARY_DOCUMENT_NAME);
        summaryDocument.setPatient(form.getGlobalContext().Core.getPatientShort());
        summaryDocument.setEpisodeofCare(form.getGlobalContext().Core.getEpisodeofCareShort());
        summaryDocument.setCareContext(form.getGlobalContext().Core.getCurrentCareContext());
        summaryDocument.setClinicalContact(form.getGlobalContext().Core.getCurrentClinicalContact());
        summaryDocument.setCreationType(DocumentCreationType.GENERATED);
        summaryDocument.setStatus(PreActiveActiveInactiveStatus.ACTIVE);
        summaryDocument.setCategory(DocumentCategory.RACPCSUMMARY);//   WDEV-13632

        Object mos = domain.getMosUser();
        if(mos instanceof MemberOfStaffRefVo)
        {
            summaryDocument.setRecordingUser((MemberOfStaffRefVo) mos);
        }

        summaryDocument.setRecordingDateTime(new DateTime());

        Object hcp = domain.getHcpLiteUser();
        if(hcp instanceof HcpLiteVo)
        {
            summaryDocument.setAuthoringHCP((HcpRefVo) hcp);
        }
        else
        {
            if(form.getGlobalContext().Core.getCurrentCareContextIsNotNull())
            {
                summaryDocument.setAuthoringHCP(form.getGlobalContext().Core.getCurrentCareContext().getResponsibleHCP() instanceof HcpRefVo ? (HcpRefVo) form.getGlobalContext().Core.getCurrentCareContext().getResponsibleHCP() : null);
            }
        }

        summaryDocument.setAuthoringDateTime(new DateTime());

        if(form.getGlobalContext().Core.getEpisodeofCareShortIsNotNull())
        {
            summaryDocument.setSpecialty(form.getGlobalContext().Core.getEpisodeofCareShort().getSpecialty());
        }

        if(form.getGlobalContext().Core.getCurrentCareContextIsNotNull())
        {
            summaryDocument.setDocumentDate(form.getGlobalContext().Core.getCurrentCareContext().getStartDateTime() != null ? form.getGlobalContext().Core.getCurrentCareContext().getStartDateTime().getDate() : null);
            summaryDocument.setResponsibleHCP(form.getGlobalContext().Core.getCurrentCareContext().getResponsibleHCP() instanceof HcpRefVo ? (HcpRefVo) form.getGlobalContext().Core.getCurrentCareContext().getResponsibleHCP() : null);
        }

        ServerDocumentVo doc = new ServerDocumentVo();
        doc.setFileName(fileName);
        doc.setFileType(FileType.PDF);

        summaryDocument.setServerDocument(doc);

        return summaryDocument;
    }

    return null;
}
项目:AvoinApotti    文件:Logic.java   
private PatientDocumentVo populatePatientDocumentVo(ServerDocumentVo serverDocumentVo) 
{
    if(serverDocumentVo == null)
        return null;

    PatientDocumentVo vo = new PatientDocumentVo();
    vo.setPatient(form.getGlobalContext().Core.getPatientShort());

    vo.setEpisodeofCare(form.cmbEpisode().getValue());
    vo.setCareContext(form.cmbCContext().getValue());
    vo.setClinicalContact(form.cmbCContant().getValue());

    if(form.dyngrdReports().getValue() instanceof DocumentCategoryConfigShortVo)
    {
        DocumentCategoryConfigShortVo templateConfig = (DocumentCategoryConfigShortVo) form.dyngrdReports().getValue();

        vo.setName(templateConfig.getTemplate() != null ? templateConfig.getTemplate().getName() : null);
        vo.setCategory(templateConfig.getCategory());
    }

    vo.setStatus(PreActiveActiveInactiveStatus.ACTIVE);
    vo.setServerDocument(serverDocumentVo);

    vo.setCreationType(DocumentCreationType.GENERATED);

    MemberOfStaffLiteVo mosUser = form.ccTypist().getValue() instanceof MemberOfStaffLiteVo ? (MemberOfStaffLiteVo) form.ccTypist().getValue() : null;
    vo.setRecordingUser(mosUser);
    vo.setRecordingDateTime(new DateTime());
    vo.setCorrespondenceStatus(DocumentStatus.DRAFT);
    vo.setSpecialty(form.cmbSpecialty().getValue());

    HcpRefVo hcpUser = form.ccAuthoring().getValue() instanceof HcpRefVo ? (HcpRefVo) form.ccAuthoring().getValue() : null;
    vo.setAuthoringHCP(hcpUser);
    vo.setAuthoringDateTime(new DateTime());

    vo.setDocumentDate(form.dteDocumentDate().getValue());

    PatientDocumentStatusVo status  = new PatientDocumentStatusVo();
    status.setCorrespondenceStatus(DocumentStatus.DRAFT);
    status.setRecordingDateTime(new DateTime());
    status.setRecordingUser(mosUser);

    vo.setCurrentDocumentStatus(status);
    vo.setDocumentStatusHistory(new PatientDocumentStatusVoCollection());
    vo.getDocumentStatusHistory().add(status);

    HcpRefVo responsibleHcp = form.ccResponsibleHcp().getValue() instanceof HcpRefVo ? (HcpRefVo) form.ccResponsibleHcp().getValue() : null;
    vo.setResponsibleHCP(responsibleHcp);

    Boolean copyLetter = new Boolean(form.Group1().getValue().equals(GenForm.Group1Enumeration.rdoYes));
    vo.setCopyPatientOnCorrespondence(copyLetter);

    return vo;
}
项目:AvoinApotti    文件:Logic.java   
private PatientDocumentVo populatePatientDocumentVo(PatientShort patient, CareContextMinVo careContext, ClinicRefVo clinic, ServerDocumentVo serverDocumentVo) 
{
    if(serverDocumentVo == null)
        return null;

    PatientDocumentVo vo = new PatientDocumentVo();
    vo.setPatient(patient);

    vo.setEpisodeofCare(careContext != null ? careContext.getEpisodeOfCare() : null);
    vo.setCareContext(careContext);

    if(form.lyrLetterCreate().tabTemplate().dyngrdReports().getValue() instanceof TemplateForPatientDocumentVo)
    {
        vo.setName(((TemplateForPatientDocumentVo) form.lyrLetterCreate().tabTemplate().dyngrdReports().getValue()).getName());

        DocumentCategoryConfigShortVo dc = domain.getDocCatConfig((TemplateForPatientDocumentVo) form.lyrLetterCreate().tabTemplate().dyngrdReports().getValue());
        vo.setCategory(dc != null ? dc.getCategory() : null);
    }

    vo.setServerDocument(serverDocumentVo);
    vo.setCreationType(DocumentCreationType.GENERATED);
    vo.setStatus(PreActiveActiveInactiveStatus.ACTIVE);

    MemberOfStaffLiteVo mosUser = form.lyrLetterCreate().tabTemplate().ccTypist().getValue() instanceof MemberOfStaffLiteVo ? (MemberOfStaffLiteVo) form.lyrLetterCreate().tabTemplate().ccTypist().getValue() : null;
    vo.setRecordingUser(mosUser);
    vo.setRecordingDateTime(new DateTime());

    HcpRefVo hcpUser = form.lyrLetterCreate().tabTemplate().ccAuth().getValue() instanceof HcpRefVo ? (HcpRefVo) form.lyrLetterCreate().tabTemplate().ccAuth().getValue() : null;
    vo.setAuthoringHCP(hcpUser);
    vo.setAuthoringDateTime(new DateTime());

    vo.setSpecialty(form.lyrLetterCreate().tabTemplate().cmbSpecialty().getValue()!=null?form.lyrLetterCreate().tabTemplate().cmbSpecialty().getValue():((careContext != null && careContext.getEpisodeOfCare() != null) ? careContext.getEpisodeOfCare().getSpecialty() : null));

    PatientDocumentStatusVo documentStatus = new PatientDocumentStatusVo();
    documentStatus.setCorrespondenceStatus(DocumentStatus.DRAFT);
    documentStatus.setRecordingUser((MemberOfStaffLiteVo)domain.getMosUser());
    documentStatus.setRecordingDateTime(new DateTime());

    vo.setCurrentDocumentStatus(documentStatus);

    PatientDocumentStatusVoCollection historyStatus = new PatientDocumentStatusVoCollection();
    historyStatus.add(documentStatus);
    vo.setDocumentStatusHistory(historyStatus);

    vo.setDocumentDate(form.lyrLetterCreate().tabTemplate().dteDocDate().getValue()!=null?form.lyrLetterCreate().tabTemplate().dteDocDate().getValue():((careContext != null && careContext.getStartDateTime() != null ) ? careContext.getStartDateTime().getDate() : new Date()));

    //WDEV-12721
    if(form.getLocalContext().getMinDate() == null || vo.getDocumentDate().isLessThan(form.getLocalContext().getMinDate()))
        form.getLocalContext().setMinDate(vo.getDocumentDate());

    //WDEV-12721
    if(form.getLocalContext().getMaxDate() == null || vo.getDocumentDate().isGreaterThan(form.getLocalContext().getMaxDate()))
        form.getLocalContext().setMaxDate(vo.getDocumentDate());

    vo.setClinic(clinic);

    HcpRefVo responsibleHcp = form.lyrLetterCreate().tabTemplate().ccResponsible().getValue() instanceof HcpRefVo ? (HcpRefVo)form.lyrLetterCreate().tabTemplate().ccResponsible().getValue():(careContext != null && careContext.getResponsibleHCP() != null) ? careContext.getResponsibleHCP() : (careContext != null && careContext.getEpisodeOfCare() != null) ? careContext.getEpisodeOfCare().getResponsibleHCP() : null;
    vo.setResponsibleHCP(responsibleHcp);

    return vo;
}
项目:AvoinApotti    文件:Logic.java   
private PatientDocumentVo populatePatientDocumentVo(ServerDocumentVo serverDocument, ReportVo reportVo)
{
    if (serverDocument==null)
        return null;

    // Create Patient Document VO
    PatientDocumentVo patientDocument = new PatientDocumentVo();

    patientDocument.setPatient(form.getGlobalContext().Core.getPatientShort());

    patientDocument.setEpisodeofCare(form.getGlobalContext().Core.getEpisodeofCareShort());
    patientDocument.setCareContext(form.getGlobalContext().Core.getCurrentCareContext());
    patientDocument.setClinicalContact(form.getGlobalContext().Core.getCurrentClinicalContact());


    if (reportVo!=null)
    {
        patientDocument.setName(reportVo.getReportName());
    }

    patientDocument.setServerDocument(serverDocument);
    patientDocument.setCreationType(DocumentCreationType.GENERATED);

    patientDocument.setCategory(DocumentCategory.ADHOC_DOCUMENT);

    patientDocument.setStatus(PreActiveActiveInactiveStatus.ACTIVE);

    patientDocument.setRecordingUser(domain.getMosUser() instanceof MemberOfStaffRefVo ? (MemberOfStaffRefVo) domain.getMosUser() : null);
    patientDocument.setRecordingDateTime(new DateTime());
    patientDocument.setAuthoringHCP(domain.getHcpLiteUser() instanceof HcpLiteVo ? (HcpRefVo)domain.getHcpLiteUser() : null);
    patientDocument.setAuthoringDateTime(new DateTime());

    // Create a new PatientDocumentStatusVo
    PatientDocumentStatusVo status = new PatientDocumentStatusVo();
    status.setCorrespondenceStatus(DocumentStatus.COMPLETED);
    status.setRecordingUser(patientDocument.getRecordingUser());
    status.setRecordingDateTime(patientDocument.getRecordingDateTime());

    patientDocument.setCurrentDocumentStatus(status);
    patientDocument.setDocumentStatusHistory(new PatientDocumentStatusVoCollection());
    patientDocument.getDocumentStatusHistory().add(status);

    patientDocument.setDocumentDate(form.getGlobalContext().Core.getCurrentCareContext() != null && form.getGlobalContext().Core.getCurrentCareContext().getStartDateTime()!=null ? form.getGlobalContext().Core.getCurrentCareContext().getStartDateTime().getDate() : patientDocument.getRecordingDateTime().getDate());
    patientDocument.setResponsibleHCP(form.getGlobalContext().Core.getEpisodeofCareShort()!=null ? form.getGlobalContext().Core.getEpisodeofCareShort().getResponsibleHCP():null);
    patientDocument.setSpecialty(form.getGlobalContext().Core.getEpisodeofCareShort()!=null ? form.getGlobalContext().Core.getEpisodeofCareShort().getSpecialty():null);

    return patientDocument;
}
项目:openMAXIMS    文件:Logic.java   
private PatientDocumentForRACPCSummaryVo populatePatientDocument() 
{
    String fileName = createAndUploadDocument();

    if(fileName != null)
    {
        PatientDocumentForRACPCSummaryVo summaryDocument = new PatientDocumentForRACPCSummaryVo();

        summaryDocument.setName(SUMMARY_DOCUMENT_NAME);
        summaryDocument.setPatient(form.getGlobalContext().Core.getPatientShort());
        summaryDocument.setEpisodeofCare(form.getGlobalContext().Core.getEpisodeofCareShort());
        summaryDocument.setCareContext(form.getGlobalContext().Core.getCurrentCareContext());
        summaryDocument.setClinicalContact(form.getGlobalContext().Core.getCurrentClinicalContact());
        summaryDocument.setCreationType(DocumentCreationType.GENERATED);
        summaryDocument.setStatus(PreActiveActiveInactiveStatus.ACTIVE);
        summaryDocument.setCategory(DocumentCategory.RACPCSUMMARY);//   WDEV-13632

        Object mos = domain.getMosUser();
        if(mos instanceof MemberOfStaffRefVo)
        {
            summaryDocument.setRecordingUser((MemberOfStaffRefVo) mos);
        }

        summaryDocument.setRecordingDateTime(new DateTime());

        Object hcp = domain.getHcpLiteUser();
        if(hcp instanceof HcpLiteVo)
        {
            summaryDocument.setAuthoringHCP((HcpRefVo) hcp);
        }
        else
        {
            if(form.getGlobalContext().Core.getCurrentCareContextIsNotNull())
            {
                summaryDocument.setAuthoringHCP(form.getGlobalContext().Core.getCurrentCareContext().getResponsibleHCP() instanceof HcpRefVo ? (HcpRefVo) form.getGlobalContext().Core.getCurrentCareContext().getResponsibleHCP() : null);
            }
        }

        summaryDocument.setAuthoringDateTime(new DateTime());

        if(form.getGlobalContext().Core.getEpisodeofCareShortIsNotNull())
        {
            summaryDocument.setSpecialty(form.getGlobalContext().Core.getEpisodeofCareShort().getSpecialty());
        }

        if(form.getGlobalContext().Core.getCurrentCareContextIsNotNull())
        {
            summaryDocument.setDocumentDate(form.getGlobalContext().Core.getCurrentCareContext().getStartDateTime() != null ? form.getGlobalContext().Core.getCurrentCareContext().getStartDateTime().getDate() : null);
            summaryDocument.setResponsibleHCP(form.getGlobalContext().Core.getCurrentCareContext().getResponsibleHCP() instanceof HcpRefVo ? (HcpRefVo) form.getGlobalContext().Core.getCurrentCareContext().getResponsibleHCP() : null);
        }

        ServerDocumentVo doc = new ServerDocumentVo();
        doc.setFileName(fileName);
        doc.setFileType(FileType.PDF);

        summaryDocument.setServerDocument(doc);

        return summaryDocument;
    }

    return null;
}
项目:openMAXIMS    文件:Logic.java   
private PatientDocumentVo populatePatientDocumentVo(ServerDocumentVo serverDocumentVo) 
{
    if(serverDocumentVo == null)
        return null;

    PatientDocumentVo vo = new PatientDocumentVo();
    vo.setPatient(form.getGlobalContext().Core.getPatientShort());

    vo.setEpisodeofCare(form.cmbEpisode().getValue());
    vo.setCareContext(form.cmbCContext().getValue());
    vo.setClinicalContact(form.cmbCContant().getValue());

    if(form.dyngrdReports().getValue() instanceof DocumentCategoryConfigShortVo)
    {
        DocumentCategoryConfigShortVo templateConfig = (DocumentCategoryConfigShortVo) form.dyngrdReports().getValue();

        vo.setName(templateConfig.getTemplate() != null ? templateConfig.getTemplate().getName() : null);
        vo.setCategory(templateConfig.getCategory());
    }

    vo.setStatus(PreActiveActiveInactiveStatus.ACTIVE);
    vo.setServerDocument(serverDocumentVo);

    vo.setCreationType(DocumentCreationType.GENERATED);

    MemberOfStaffLiteVo mosUser = form.ccTypist().getValue() instanceof MemberOfStaffLiteVo ? (MemberOfStaffLiteVo) form.ccTypist().getValue() : null;
    vo.setRecordingUser(mosUser);
    vo.setRecordingDateTime(new DateTime());
    vo.setCorrespondenceStatus(DocumentStatus.DRAFT);
    vo.setSpecialty(form.cmbSpecialty().getValue());

    HcpRefVo hcpUser = form.ccAuthoring().getValue() instanceof HcpRefVo ? (HcpRefVo) form.ccAuthoring().getValue() : null;
    vo.setAuthoringHCP(hcpUser);
    vo.setAuthoringDateTime(new DateTime());

    vo.setDocumentDate(form.dteDocumentDate().getValue());

    PatientDocumentStatusVo status  = new PatientDocumentStatusVo();
    status.setCorrespondenceStatus(DocumentStatus.DRAFT);
    status.setRecordingDateTime(new DateTime());
    status.setRecordingUser(mosUser);

    vo.setCurrentDocumentStatus(status);
    vo.setDocumentStatusHistory(new PatientDocumentStatusVoCollection());
    vo.getDocumentStatusHistory().add(status);

    HcpRefVo responsibleHcp = form.ccResponsibleHcp().getValue() instanceof HcpRefVo ? (HcpRefVo) form.ccResponsibleHcp().getValue() : null;
    vo.setResponsibleHCP(responsibleHcp);

    Boolean copyLetter = new Boolean(form.Group1().getValue().equals(GenForm.Group1Enumeration.rdoYes));
    vo.setCopyPatientOnCorrespondence(copyLetter);

    return vo;
}