Search in sources :

Example 1 with TriageLine

use of org.nhspathways.webservices.pathways.pathwayscase.PathwaysCaseDocument.PathwaysCase.PathwayDetails.PathwayTriageDetails.PathwayTriage.TriageLineDetails.TriageLine in project integration-adaptor-111 by nhsconnect.

the class PathwayUtil method getQuestionnaireResponses.

public List<QuestionnaireResponse> getQuestionnaireResponses(POCDMT000002UK01ClinicalDocument1 clinicalDocument, Reference patient, Reference encounter) throws XmlException {
    List<QuestionnaireResponse> questionnaireResponseList = new ArrayList<>();
    String pathwaysCase = findPathwaysCase(clinicalDocument);
    if (pathwaysCase != null) {
        PathwaysCase pathwaysCaseDocument = PathwaysCaseDocument.Factory.parse(pathwaysCase).getPathwaysCase();
        TriageLine[] triageLineArray = pathwaysCaseDocument.getPathwayDetails().getPathwayTriageDetails().getPathwayTriageArray(0).getTriageLineDetails().getTriageLineArray();
        for (TriageLine traigeLine : triageLineArray) {
            questionnaireResponseList.add(questionnaireResponseMapper.mapQuestionnaireResponse(pathwaysCaseDocument, patient, encounter, traigeLine));
        }
        return questionnaireResponseList;
    }
    return null;
}
Also used : ArrayList(java.util.ArrayList) TriageLine(org.nhspathways.webservices.pathways.pathwayscase.PathwaysCaseDocument.PathwaysCase.PathwayDetails.PathwayTriageDetails.PathwayTriage.TriageLineDetails.TriageLine) QuestionnaireResponse(org.hl7.fhir.dstu3.model.QuestionnaireResponse) PathwaysCase(org.nhspathways.webservices.pathways.pathwayscase.PathwaysCaseDocument.PathwaysCase)

Aggregations

ArrayList (java.util.ArrayList)1 QuestionnaireResponse (org.hl7.fhir.dstu3.model.QuestionnaireResponse)1 PathwaysCase (org.nhspathways.webservices.pathways.pathwayscase.PathwaysCaseDocument.PathwaysCase)1 TriageLine (org.nhspathways.webservices.pathways.pathwayscase.PathwaysCaseDocument.PathwaysCase.PathwayDetails.PathwayTriageDetails.PathwayTriage.TriageLineDetails.TriageLine)1