use of org.hl7.v3.RCMRMT030101UK04CompoundStatement in project nia-patient-switching-standard-adaptor by NHSDigital.
the class EncounterMapper method generateStructuredConsultation.
private void generateStructuredConsultation(List<RCMRMT030101UK04CompoundStatement> topicCompoundStatementList, RCMRMT030101UK04EhrComposition ehrComposition, ListResource consultation, List<ListResource> topics, List<ListResource> categories) {
topicCompoundStatementList.forEach(topicCompoundStatement -> {
var topic = consultationListMapper.mapToTopic(consultation, topicCompoundStatement);
consultation.addEntry(new ListEntryComponent(new Reference(topic)));
generateCategoryLists(topicCompoundStatement, topic, categories);
generateLinkSetTopicLists(ehrComposition, consultation, topics);
topics.add(topic);
});
}
use of org.hl7.v3.RCMRMT030101UK04CompoundStatement in project nia-patient-switching-standard-adaptor by NHSDigital.
the class ResourceReferenceUtilTest method testMedicationResourcesReferencedAtCompoundStatementLevel.
@Test
public void testMedicationResourcesReferencedAtCompoundStatementLevel() {
final RCMRMT030101UK04CompoundStatement compoundStatement = unmarshallCompoundStatementElement("compound_statement_medication.xml");
List<Reference> references = new ArrayList<>();
resourceReferenceUtil.extractChildReferencesFromCompoundStatement(compoundStatement, references);
assertThat(references.size()).isEqualTo(THREE);
assertThat(references.get(0).getReference()).isEqualTo("MedicationStatement/A0A70B62-2649-4C8F-B3AB-618B8257C942-MS");
assertThat(references.get(1).getReference()).isEqualTo("MedicationRequest/A0A70B62-2649-4C8F-B3AB-618B8257C942");
assertThat(references.get(2).getReference()).isEqualTo("MedicationRequest/9B4B797A-D674-4362-B666-2ADC8551EEDA");
}
use of org.hl7.v3.RCMRMT030101UK04CompoundStatement in project nia-patient-switching-standard-adaptor by NHSDigital.
the class ConsultationListMapperTest method setUpCompoundStatement.
private RCMRMT030101UK04CompoundStatement setUpCompoundStatement(String originalText, String display, String availabilityTime, boolean nullFlavorCode) {
RCMRMT030101UK04CompoundStatement compoundStatement = new RCMRMT030101UK04CompoundStatement();
II id = new II();
id.setRoot(COMPOUND_STATEMENT_ID);
CD cd = new CD();
if (nullFlavorCode) {
cd.setNullFlavor(CsNullFlavor.UNK);
} else {
cd.setOriginalText(originalText);
cd.setDisplayName(display);
cd.setCodeSystem("2.16.840.1.113883.2.1.6.2");
cd.setCode("14L..00");
}
TS ts = new TS();
if (availabilityTime != null) {
ts.setValue(availabilityTime);
} else {
ts.setNullFlavor(CsNullFlavor.NI);
}
compoundStatement.setAvailabilityTime(ts);
compoundStatement.getId().add(id);
compoundStatement.setCode(cd);
return compoundStatement;
}
Aggregations