Java 类ims.core.vo.ServerDocumentVo 实例源码

项目:AvoinApotti    文件:Logic.java   
private void editDocument() 
{
    if(form.getLocalContext().getSelectedDocumentIsNotNull())
    {
        ServerDocumentVo document = form.getLocalContext().getSelectedDocument().getServerDocument();
        if(document != null)
        {
            String fileName = document.getFileName();
            String filePath = (getPdfStorePath() + fileName).replace("/", "\\");

            if(FileType.DOC.equals(document.getFileType()))
            {
                String winPath = engine.getLocalSettings().getWordEditorPath();

                if(winPath == null || winPath.length() == 0)
                {
                    form.getLocalContext().setTryingToEditWhitoutPath(true);
                    engine.open(form.getForms().Core.LocalSettingsDialog);
                    return;
                }

                engine.runExternalApplication(winPath + " " + filePath);
            }
        }
    }
}
项目:AvoinApotti    文件:Logic.java   
private PatientDocumentVo populatePatientDocumentVo(ServerDocumentVo serverDocumentVo)
{
    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(form.txtName().getValue());
    vo.setServerDocument(serverDocumentVo);
    vo.setCreationType(form.cmbType().getValue());
    vo.setCategory(form.cmbSource().getValue());
    vo.setDocumentDate(form.getGlobalContext().Core.getCurrentCareContextIsNotNull() ? form.getGlobalContext().Core.getCurrentCareContext().getStartDateTime().getDate() : (form.getGlobalContext().Core.getEpisodeofCareShortIsNotNull() ? form.getGlobalContext().Core.getEpisodeofCareShort().getStartDate() : new Date()));//   WDEV-13638, WDEV-12356
    vo.setRecordingUser((MemberOfStaffRefVo)domain.getMosUser(engine.getLoggedInUser().getUsername()));
    vo.setRecordingDateTime(new DateTime());
    vo.setStatus(PreActiveActiveInactiveStatus.ACTIVE);

    vo.setResponsibleHCP(form.getGlobalContext().Core.getEpisodeofCareShortIsNotNull() ? form.getGlobalContext().Core.getEpisodeofCareShort().getResponsibleHCP() : null);//WDEV-13338
    vo.setSpecialty(form.getGlobalContext().Core.getEpisodeofCareShortIsNotNull() ? form.getGlobalContext().Core.getEpisodeofCareShort().getSpecialty() : null);//WDEV-13338
    return vo;
}
项目:AvoinApotti    文件:Logic.java   
private void viewInstance()
{
    if (form.getLocalContext().getSelectedDocumentIsNotNull())
    {
        ServerDocumentVo document = form.getLocalContext().getSelectedDocument().getServerDocument();
        if (document != null)
        {
            String fileName = document.getFileName();
            String fullPath = getMaximsDocumentStorePath();

            if (FileType.DOC.equals(document.getFileType()))
            {
                throw new CodingRuntimeException("Trying to view a draft document not allowed");
            }

            fullPath += fileName;

            selectPatient(form.getLocalContext().getSelectedDocument().getPatient());
            engine.open(form.getForms().Core.PatientDocumentView, new Object[] { fullPath.replace("/", "\\") });
        }
    }
}
项目: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 ServerDocumentVo populateServerDocument(String fileName)
{
    DateTime date = new DateTime();

    int year = date.getDate().getYear();
    int month = date.getDate().getMonth();
    int day = date.getDate().getDay();

    String filePath = year + "/" + month + "/" + day + "/" + fileName;

    ServerDocumentVo document = new ServerDocumentVo();

    document.setFileName(filePath);
    document.setFileType(FileType.PDF);

    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 ServerDocumentVo populateServerDocument(String fileName)
{
    DateTime date = new DateTime();

    int year = date.getDate().getYear();
    int month = date.getDate().getMonth();
    int day = date.getDate().getDay();

    String filePath = year + "/" + month + "/" + day + "/" + fileName;

    ServerDocumentVo document = new ServerDocumentVo();

    document.setFileName(filePath);
    document.setFileType(FileType.PDF);

    return document;
}
项目: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 void openReport()
{
    if(form.getLocalContext().getCatsReport() == null)
        return;

    ServerDocumentVo document = form.getLocalContext().getCatsReport().getServerDocument();

    if (document != null)
    {
        String fileName = document.getFileName();
        String fullPath = getMaximsDocumentStorePath();

        fullPath += fileName;

        //engine.open(form.getForms().Core.PatientDocumentView, new Object[] {fullPath.replace("/", "\\")});

        engine.openUrl(fullPath);
    }
}
项目: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 void viewPatientDocuments(PatientDocumentLiteVo doc)
{
    if(doc == null)
        return;

    ServerDocumentVo document = doc.getServerDocument();

    if (document != null)
    {
        String fileName = document.getFileName();
        String fullPath = getMaximsDocumentStorePath();

        fullPath += fileName;

        engine.open(form.getForms().Core.PatientDocumentView, new Object[] {fullPath.replace("/", "\\")});
        //engine.openUrl(fullPath);
    }
}
项目: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 void editDocument() 
{
    if(form.getLocalContext().getSelectedDocumentIsNotNull())
    {
        ServerDocumentVo document = form.getLocalContext().getSelectedDocument().getServerDocument();
        if(document != null)
        {
            String fileName = document.getFileName();
            String filePath = (getPdfStorePath() + fileName).replace("/", "\\");

            if(FileType.DOC.equals(document.getFileType()))
            {
                String winPath = engine.getLocalSettings().getWordEditorPath();

                if(winPath == null || winPath.length() == 0)
                {
                    form.getLocalContext().setTryingToEditWhitoutPath(true);
                    engine.open(form.getForms().Core.LocalSettingsDialog);
                    return;
                }

                engine.runExternalApplication(winPath + " " + filePath);
            }
        }
    }
}
项目:openMAXIMS    文件:Logic.java   
private PatientDocumentVo populatePatientDocumentVo(ServerDocumentVo serverDocumentVo)
{
    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(form.txtName().getValue());
    vo.setServerDocument(serverDocumentVo);
    vo.setCreationType(form.cmbType().getValue());
    vo.setCategory(form.cmbSource().getValue());
    vo.setDocumentDate(form.getGlobalContext().Core.getCurrentCareContextIsNotNull() ? form.getGlobalContext().Core.getCurrentCareContext().getStartDateTime().getDate() : (form.getGlobalContext().Core.getEpisodeofCareShortIsNotNull() ? form.getGlobalContext().Core.getEpisodeofCareShort().getStartDate() : new Date()));//   WDEV-13638, WDEV-12356
    vo.setRecordingUser((MemberOfStaffRefVo)domain.getMosUser(engine.getLoggedInUser().getUsername()));
    vo.setRecordingDateTime(new DateTime());
    vo.setStatus(PreActiveActiveInactiveStatus.ACTIVE);

    vo.setResponsibleHCP(form.getGlobalContext().Core.getEpisodeofCareShortIsNotNull() ? form.getGlobalContext().Core.getEpisodeofCareShort().getResponsibleHCP() : null);//WDEV-13338
    vo.setSpecialty(form.getGlobalContext().Core.getEpisodeofCareShortIsNotNull() ? form.getGlobalContext().Core.getEpisodeofCareShort().getSpecialty() : null);//WDEV-13338
    return vo;
}
项目:openMAXIMS    文件:Logic.java   
private ServerDocumentVo populateServerDocument(byte[] reportContent)
{
    String fileName = generateName() + ".pdf";

    engine.uploadFile(ConfigFlag.GEN.PDF_UPLOAD_URL.getValue(), reportContent, fileName, ConfigFlag.GEN.FILE_UPLOAD_DIR.getValue() + "/");//WDEV-15470

    String path = null;

    int year  = new DateTime().getDate().getYear();
    int month = new DateTime().getDate().getMonth();
    int day   = new DateTime().getDate().getDay();

    if(fileName != null && fileName.length() > 0)
        path = year + "/" + month + "/" + day + "/" + fileName;//WDEV-15470

    // Create Server document VO if uploads succeeds
    ServerDocumentVo document = new ServerDocumentVo();
    document.setFileName(path);
    document.setFileType(FileType.PDF);

    return document;
}
项目:openMAXIMS    文件:Logic.java   
private void convertDraftPatientDoc(PatientDocumentVo patientDocument) 
{
    if (patientDocument == null)
        return;

    String rtfFileName = null;

    ServerDocumentVo document = patientDocument.getServerDocument();
    String pdfFileName = null;
    if (document != null)
    {
        rtfFileName = document.getFileName();
        pdfFileName = convertRtfToPdf(rtfFileName, false);
        if(pdfFileName == null)
            return;
    }
    patientDocument.setServerDocument(document);
    form.getLocalContext().setDraftPDFFileName(pdfFileName);
}
项目:openMAXIMS    文件:Logic.java   
private void  convertDraftPatientDoc(PatientDocumentVo patientDocument)
    {
        if (patientDocument == null)
            return;

        String rtfFileName = null;

        ServerDocumentVo document = patientDocument.getServerDocument();
        String pdfFileName = null;
        if (document != null)
        {
            rtfFileName = document.getFileName();
            pdfFileName = convertDrafRtfToPdf(rtfFileName);

            if(pdfFileName == null)
                return;

//          document.setFileName(pdfFileName);
//          document.setFileType(FileType.PDF);
        }
        patientDocument.setServerDocument(document);
        form.getLocalContext().setDraftPDFFileName(pdfFileName);
    }
项目:openMAXIMS    文件:Logic.java   
private void viewDocument() 
{
    if(form.getLocalContext().getSelectedDocumentIsNotNull())
    {
        PatientDocumentVo selectedPatDocumentVo = form.getLocalContext().getSelectedDocument();
        String fullPath = "";
        boolean isDraft = selectedPatDocumentVo != null  && isDraft(selectedPatDocumentVo.getCurrentDocumentStatus());
        boolean showWarningMessage = ConfigFlag.UI.PATIENT_DOCUMENTS_VIEW_DRAFT_WARNING_MESSAGE.getValue() != null && ConfigFlag.UI.PATIENT_DOCUMENTS_VIEW_DRAFT_WARNING_MESSAGE.getValue().length() > 0 && isDraft;
        if (isDraft)
        {
            if(!loadSelectedDocument())
                return;
            convertDraftPatientDoc(selectedPatDocumentVo);
            fullPath = EnvironmentConfig.getAplicationURL() + (ConfigFlag.GEN.FILE_UPLOAD_DIR.getValue().endsWith("/") ? ConfigFlag.GEN.FILE_UPLOAD_DIR.getValue().replace("/", "") : ConfigFlag.GEN.FILE_UPLOAD_DIR.getValue()) + "/" + getBaseName(form.getLocalContext().getDraftPDFFileName());
        }
        ServerDocumentVo document = form.getLocalContext().getSelectedDocument().getServerDocument();
        if(document != null)
        {
            if (FileType.PDF.equals(document.getFileType()))
            {
                fullPath = getFullPath(document);
            }
            engine.open(form.getForms().Core.PatientDocumentView, new Object[] {fullPath.replace("/", "\\"),showWarningMessage},true,true);//WDEV-18651 //WDEV-1867         
        }
    }
}
项目: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 ServerDocumentVo populateServerDocument(String fileName)
{
    DateTime date = new DateTime();

    int year = date.getDate().getYear();
    int month = date.getDate().getMonth();
    int day = date.getDate().getDay();

    String filePath = year + "/" + month + "/" + day + "/" + fileName;

    ServerDocumentVo document = new ServerDocumentVo();

    document.setFileName(filePath);
    document.setFileType(FileType.PDF);

    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 ServerDocumentVo populateServerDocument(String fileName)
{
    DateTime date = new DateTime();

    int year = date.getDate().getYear();
    int month = date.getDate().getMonth();
    int day = date.getDate().getDay();

    String filePath = year + "/" + month + "/" + day + "/" + fileName;

    ServerDocumentVo document = new ServerDocumentVo();

    document.setFileName(filePath);
    document.setFileType(FileType.PDF);

    return document;
}
项目:openMAXIMS    文件:Logic.java   
private void openReport()
{
    if(form.getLocalContext().getCatsReport() == null)
        return;

    ServerDocumentVo document = form.getLocalContext().getCatsReport().getServerDocument();

    if (document != null)
    {
        String fileName = document.getFileName();
        String fullPath = getMaximsDocumentStorePath();

        fullPath += fileName;

        //engine.open(form.getForms().Core.PatientDocumentView, new Object[] {fullPath.replace("/", "\\")});

        engine.openUrl(fullPath);
    }
}
项目: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 void viewPatientDocuments(PatientDocumentLiteVo doc)
{
    if(doc == null)
        return;

    ServerDocumentVo document = doc.getServerDocument();

    if (document != null)
    {
        String fileName = document.getFileName();
        String fullPath = getMaximsDocumentStorePath();

        fullPath += fileName;

        engine.open(form.getForms().Core.PatientDocumentView, new Object[] {fullPath.replace("/", "\\")});
        //engine.openUrl(fullPath);
    }
}
项目: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 void editDocument() 
{
    if(form.getLocalContext().getSelectedDocumentIsNotNull())
    {
        ServerDocumentVo document = form.getLocalContext().getSelectedDocument().getServerDocument();
        if(document != null)
        {
            String fileName = document.getFileName();
            String filePath = (getPdfStorePath() + fileName).replace("/", "\\");

            if(FileType.DOC.equals(document.getFileType()))
            {
                String winPath = engine.getLocalSettings().getWordEditorPath();

                if(winPath == null || winPath.length() == 0)
                {
                    form.getLocalContext().setTryingToEditWhitoutPath(true);
                    engine.open(form.getForms().Core.LocalSettingsDialog);
                    return;
                }

                engine.runExternalApplication(winPath + " " + filePath);
            }
        }
    }
}
项目:openMAXIMS    文件:Logic.java   
private PatientDocumentVo populatePatientDocumentVo(ServerDocumentVo serverDocumentVo)
{
    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(form.txtName().getValue());
    vo.setServerDocument(serverDocumentVo);
    vo.setCreationType(form.cmbType().getValue());
    vo.setCategory(form.cmbSource().getValue());
    vo.setDocumentDate(form.getGlobalContext().Core.getCurrentCareContextIsNotNull() ? form.getGlobalContext().Core.getCurrentCareContext().getStartDateTime().getDate() : (form.getGlobalContext().Core.getEpisodeofCareShortIsNotNull() ? form.getGlobalContext().Core.getEpisodeofCareShort().getStartDate() : new Date()));//   WDEV-13638, WDEV-12356
    vo.setRecordingUser((MemberOfStaffRefVo)domain.getMosUser(engine.getLoggedInUser().getUsername()));
    vo.setRecordingDateTime(new DateTime());
    vo.setStatus(PreActiveActiveInactiveStatus.ACTIVE);

    vo.setResponsibleHCP(form.getGlobalContext().Core.getEpisodeofCareShortIsNotNull() ? form.getGlobalContext().Core.getEpisodeofCareShort().getResponsibleHCP() : null);//WDEV-13338
    vo.setSpecialty(form.getGlobalContext().Core.getEpisodeofCareShortIsNotNull() ? form.getGlobalContext().Core.getEpisodeofCareShort().getSpecialty() : null);//WDEV-13338
    return vo;
}
项目:openMAXIMS    文件:Logic.java   
private void viewInstance()
{
    if (form.getLocalContext().getSelectedDocumentIsNotNull())
    {
        ServerDocumentVo document = form.getLocalContext().getSelectedDocument().getServerDocument();
        if (document != null)
        {
            String fileName = document.getFileName();
            String fullPath = getMaximsDocumentStorePath();

            if (FileType.DOC.equals(document.getFileType()))
            {
                throw new CodingRuntimeException("Trying to view a draft document not allowed");
            }

            fullPath += fileName;

            selectPatient(form.getLocalContext().getSelectedDocument().getPatient());
            engine.open(form.getForms().Core.PatientDocumentView, new Object[] { fullPath.replace("/", "\\") });
        }
    }
}
项目:openmaxims-linux    文件:Logic.java   
private void viewInstance()
{
    if (form.getLocalContext().getSelectedDocumentIsNotNull())
    {
        ServerDocumentVo document = form.getLocalContext().getSelectedDocument().getServerDocument();
        if (document != null)
        {
            String fileName = document.getFileName();
            String fullPath = getMaximsDocumentStorePath();

            if (FileType.DOC.equals(document.getFileType()))
            {
                throw new CodingRuntimeException("Trying to view a draft document not allowed");
            }

            fullPath += fileName;

            selectPatient(form.getLocalContext().getSelectedDocument().getPatient());
            engine.open(form.getForms().Core.PatientDocumentView, new Object[] { fullPath.replace("/", "\\") });
        }
    }
}
项目: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 ServerDocumentVo populateServerDocument(String fileName)
{
    DateTime date = new DateTime();

    int year = date.getDate().getYear();
    int month = date.getDate().getMonth();
    int day = date.getDate().getDay();

    String filePath = year + "/" + month + "/" + day + "/" + fileName;

    ServerDocumentVo document = new ServerDocumentVo();

    document.setFileName(filePath);
    document.setFileType(FileType.PDF);

    return document;
}
项目: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    文件: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;
}