Skip to content
This repository has been archived by the owner on Sep 15, 2023. It is now read-only.

Commit

Permalink
Merge pull request #32 from admin-ch/feature/antigen-recovery
Browse files Browse the repository at this point in the history
  • Loading branch information
gstoehld authored Jan 21, 2022
2 parents 9138b06 + fa95aa3 commit f3504ea
Show file tree
Hide file tree
Showing 6 changed files with 30 additions and 2 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
package ch.admin.bag.covidcertificate.backend.transformation.model;

public interface TestResults {
public static String TEST_RESULT_POSITIVE = "260373001";
}
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,5 @@
public interface TestTypes {
public static String TEST_TYPE_ANTIBODY = "94504-8";
public static String TEST_TYPE_EXEMPTION = "medical-exemption";
public static String TEST_TYPE_RAT = "LP217198-3";
}
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
package ch.admin.bag.covidcertificate.backend.transformation.ws.client;

import ch.admin.bag.covidcertificate.backend.transformation.model.TestResults;
import ch.admin.bag.covidcertificate.backend.transformation.model.TestTypes;
import ch.admin.bag.covidcertificate.backend.transformation.model.VaccinationCertificateTypes;
import ch.admin.bag.covidcertificate.backend.transformation.model.pdf.BitPdfPayload;
Expand Down Expand Up @@ -30,7 +31,18 @@ public PdfResponse getPdf(BitPdfPayload payload) throws JsonProcessingException
.getTt()
.equals(TestTypes.TEST_TYPE_ANTIBODY)) {
endpoint = pdfConfig.getAntibodyEndpoint();
} else if(((DecodedTCert) decodedCert)
}else if(((DecodedTCert) decodedCert)
.getT()
.get(0)
.getTt()
.equals(TestTypes.TEST_TYPE_RAT) &&
((DecodedTCert) decodedCert)
.getT()
.get(0)
.getTr()
.equals(TestResults.TEST_RESULT_POSITIVE)){
endpoint = pdfConfig.getAntigenRecoveryEndpoint();
}else if(((DecodedTCert) decodedCert)
.getT()
.get(0)
.getTt()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ public class PdfConfig {
private String vaccinationEndpoint;
private String antibodyEndpoint;
private String exemptionEndpoint;

private String antigenRecoveryEndpoint;
private String vaccinationTouristEndpoint;

public List<String> getChIssuers() {
Expand Down Expand Up @@ -67,4 +67,12 @@ public String getExemptionEndpoint() {
public void setExemptionEndpoint(String exemptionEndpoint) {
this.exemptionEndpoint = exemptionEndpoint;
}

public String getAntigenRecoveryEndpoint() {
return antigenRecoveryEndpoint;
}

public void setAntigenRecoveryEndpoint(String antigenRecoveryEndpoint) {
this.antigenRecoveryEndpoint = antigenRecoveryEndpoint;
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ transform.pdf.vaccination-endpoint=http://localhost:8082/app/transform/v1/vaccin
transform.pdf.vaccination-tourist-endpoint=http://localhost:8082/app/transform/v1/vaccination-tourist
transform.pdf.antibody-endpoint=http://localhost:8082/app/transform/v1/antibody
transform.pdf.exemption-endpoint=http://localhost:8082/app/transform/v1/exceptional
transform.pdf.antigen-recovery-endpoint=http://localhost:8082/app/transform/v1/recover-rat

transform.pdf.chIssuers[0]=CH
transform.pdf.chIssuers[1]=CH BAG
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ transform.pdf.vaccination-endpoint=/app/transform/v1/vaccination
transform.pdf.vaccination-tourist-endpoint=/app/transform/v1/vaccination-tourist
transform.pdf.antibody-endpoint=/app/transform/v1/antibody
transform.pdf.exemption-endpoint=/app/transform/v1/exceptional
transform.pdf.antigen-recovery-endpoint=/app/transform/v1/recovery-rat

transform.pdf.chIssuers[0]=CH
transform.pdf.chIssuers[1]=CH BAG
Expand Down

0 comments on commit f3504ea

Please sign in to comment.