Skip to content

Commit

Permalink
EPA-152: Update Metadata (#19)
Browse files Browse the repository at this point in the history
  • Loading branch information
thomasrichner-oviva authored Oct 9, 2024
1 parent 6045d8d commit 83a9941
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
import de.gematik.epa.ihe.model.document.Document;
import de.gematik.epa.ihe.model.simple.AuthorInstitution;
import edu.umd.cs.findbugs.annotations.NonNull;
import jakarta.xml.ws.WebServiceException;
import java.util.List;
import java.util.UUID;
import telematik.ws.conn.exception.FaultMessageException;
Expand Down Expand Up @@ -73,7 +74,7 @@ public List<AuthorizationEntry> getAuthorizationList() {
private static <T> T wrap(WebServiceExecutor<T> requestor) {
try {
return requestor.execute();
} catch (FaultMessageException e) {
} catch (WebServiceException e) {
throw new KonnektorException("request failed: " + e.getMessage(), e);
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -86,6 +86,7 @@ void testGetCardsInfo() throws Exception {
}

@Test
@Disabled("rate limited")
void getAuthorizationList() {

// IMPORTANT: This is strictly rate-limited to once a day!
Expand Down Expand Up @@ -261,13 +262,21 @@ private Document buildDocumentPayload(
contents,
new DocumentMetadata(
List.of(
// Telematik-ID der DiGA^Name der DiGA (Name der
// Verordnungseinheit)^Oviva-AG^^^^^^&<OID für DiGAs, wie in professionOID>&ISO
// https://gemspec.gematik.de/docs/gemSpec/gemSpec_DM_ePA_EU-Pilot/gemSpec_DM_ePA_EU-Pilot_V1.53.1/#2.1.4.3.1
new Author(
null,
authorInstitution.identifier(),
"Oviva Direkt für Adipositas",
"Oviva AG",
"",
"",
"",
// professionOID for DiGA:
// https://gemspec.gematik.de/docs/gemSpec/gemSpec_OID/gemSpec_OID_V3.19.0/#3.5.1.3
// TODO read this from the SMC-B, see
// com.oviva.epa.client.internal.svc.utils.CertificateUtils::getProfessionInfoFromCertificate
"1.2.276.0.76.4.282", // OID
// Der identifier in AuthorInstitution muss eine gültige TelematikId sein, so
// wie sie z. B. auf der SMC-B-Karte enthalten ist
List.of(authorInstitution),
Expand Down

0 comments on commit 83a9941

Please sign in to comment.