Skip to content

Commit

Permalink
oehf#456: remove XDS.a remainders
Browse files Browse the repository at this point in the history
  • Loading branch information
unixoid committed Dec 21, 2024
1 parent abe8583 commit 3ac29e3
Show file tree
Hide file tree
Showing 16 changed files with 7 additions and 66 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -50,11 +50,6 @@ public XdsIntegrationProfile getInteractionProfile() {
}
}

@Override
public boolean isEbXml30Based() {
return true;
}

@Override
public HomeCommunityIdOptionality getHomeCommunityIdOptionality() {
return HomeCommunityIdOptionality.NEVER;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -44,11 +44,6 @@ public XdsIntegrationProfile getInteractionProfile() {
}
}

@Override
public boolean isEbXml30Based() {
return true;
}

@Override
public HomeCommunityIdOptionality getHomeCommunityIdOptionality() {
return HomeCommunityIdOptionality.NEVER;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -55,11 +55,6 @@ public XdsIntegrationProfile getInteractionProfile() {
}
}

@Override
public boolean isEbXml30Based() {
return true;
}

@Override
public HomeCommunityIdOptionality getHomeCommunityIdOptionality() {
return HomeCommunityIdOptionality.NEVER;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -52,11 +52,6 @@ public XdsIntegrationProfile getInteractionProfile() {
}
}

@Override
public boolean isEbXml30Based() {
return true;
}

@Override
public HomeCommunityIdOptionality getHomeCommunityIdOptionality() {
return HomeCommunityIdOptionality.ALWAYS;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -58,11 +58,6 @@ public XdsIntegrationProfile getInteractionProfile() {
}
}

@Override
public boolean isEbXml30Based() {
return true;
}

@Override
public HomeCommunityIdOptionality getHomeCommunityIdOptionality() {
return HomeCommunityIdOptionality.ON_MISSING_PATIENT_ID;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -51,11 +51,6 @@ public XdsIntegrationProfile getInteractionProfile() {
}
}

@Override
public boolean isEbXml30Based() {
return true;
}

@Override
public HomeCommunityIdOptionality getHomeCommunityIdOptionality() {
return HomeCommunityIdOptionality.ALWAYS;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -50,11 +50,6 @@ public XdsIntegrationProfile getInteractionProfile() {
}
}

@Override
public boolean isEbXml30Based() {
return true;
}

@Override
public HomeCommunityIdOptionality getHomeCommunityIdOptionality() {
return HomeCommunityIdOptionality.ALWAYS;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -44,11 +44,6 @@ public XdsIntegrationProfile getInteractionProfile() {
}
}

@Override
public boolean isEbXml30Based() {
return true;
}

@Override
public HomeCommunityIdOptionality getHomeCommunityIdOptionality() {
return HomeCommunityIdOptionality.NEVER;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -44,11 +44,6 @@ public XdsIntegrationProfile getInteractionProfile() {
}
}

@Override
public boolean isEbXml30Based() {
return true;
}

@Override
public HomeCommunityIdOptionality getHomeCommunityIdOptionality() {
return HomeCommunityIdOptionality.NEVER;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -78,11 +78,6 @@ public XdsIntegrationProfile getInteractionProfile() {
}
}

@Override
public boolean isEbXml30Based() {
return true;
}

@Override
public HomeCommunityIdOptionality getHomeCommunityIdOptionality() {
return HomeCommunityIdOptionality.NEVER;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,8 +25,6 @@ public interface XdsIntegrationProfile extends IntegrationProfile {

enum HomeCommunityIdOptionality {ALWAYS, NEVER, ON_MISSING_PATIENT_ID}

boolean isEbXml30Based();

HomeCommunityIdOptionality getHomeCommunityIdOptionality();

}
Original file line number Diff line number Diff line change
Expand Up @@ -180,12 +180,12 @@ public enum ErrorCode {
/** The receiving actor has detected an error with a SS-HM annotation. */
@XmlEnumValue("XDSMetadataAnnotationError") METADATA_ANNOTATION_ERROR("XDSMetadataAnnotationError"),

/* --- codes for ITI-16 (obsolete XDS.a profile) --- */
/** An error occurred when executing an SQL query. */
@XmlEnumValue("XDSSqlError") SQL_ERROR("XDSSqlError"),

/* --- codes for XCDR and MHD --- */
/** A value for IntendedRecipient is not recognized. */
@XmlEnumValue("UnknownRecipient") UNKNOWN_RECIPIENT("UnknownRecipient"),
/** An IntendedRecipient which would have been contacted was not available. */
@XmlEnumValue("UnavailableRecipient") UNAVAILABLE_RECIPIENT("UnavailableRecipient"),
/** A request to Publish a FHIR Document was attempted but not supported by the Document Recipient Actor. */
@XmlEnumValue("FHIRDocumentNotSupported") FHIR_DOCUMENT_NOT_SUPPORTED("FHIRDocumentNotSupported"),

/* --- special value for custom user-defined error codes --- */
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -49,13 +49,6 @@ public interface ValidationProfile {
XdsIntegrationProfile getInteractionProfile();


/**
* @return <code>true</code> when the transaction uses ebXML 3.0.
*/
default boolean isEbXml30Based() {
return getInteractionProfile().isEbXml30Based();
}

default boolean isPartOf(Class<? extends XdsIntegrationProfile> clazz) {
return clazz.isAssignableFrom(getInteractionProfile().getClass());
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,7 @@ private List<RegistryObjectValidator> documentEntrySlotValidators(ValidationProf
needHashAndSize ? 1 : 0,
isOnDemand ? 0 : 1),
new SlotValueValidation(SLOT_NAME_SOURCE_PATIENT_ID, cxValidatorRequiredAA,
(profile.isEbXml30Based() && (! limitedMetadata)) ? 1 : 0, 1),
limitedMetadata ? 0 : 1, 1),
new SlotValueValidation(SLOT_NAME_SOURCE_PATIENT_INFO, pidValidator,
isContinuaHRN ? 1 : 0, Integer.MAX_VALUE),
new SlotValueValidation(SLOT_NAME_REFERENCE_ID_LIST, cxiValidator, 0, Integer.MAX_VALUE),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,7 @@ public static Response createResponse() {
response.setStatus(Status.FAILURE);
response.getErrors().addAll(Arrays.asList(
new ErrorInfo(ErrorCode.PATIENT_ID_DOES_NOT_MATCH, "context1", Severity.ERROR, "location1", null),
new ErrorInfo(ErrorCode.SQL_ERROR, "context2", Severity.WARNING, null, null),
new ErrorInfo(ErrorCode.OBJECT_TYPE_ERROR, "context2", Severity.WARNING, null, null),
new ErrorInfo(ErrorCode._USER_DEFINED, "context3", Severity.ERROR, "location3", "MyCustomErrorCode")));
return response;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ public void testToEbXMLRegistryResponse() {

error = errors.get(1);
assertEquals("context2", error.getCodeContext());
assertEquals(ErrorCode.SQL_ERROR.getOpcode(), error.getErrorCode());
assertEquals(ErrorCode.OBJECT_TYPE_ERROR.getOpcode(), error.getErrorCode());
assertEquals(Severity.WARNING, error.getSeverity());
assertNull(error.getLocation());

Expand Down

0 comments on commit 3ac29e3

Please sign in to comment.