-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Frontend and backend updates to add description to PBF reason codes. (#…
…192) * Frontend and backend updates to add description to PBF reason codes. * Converted codes to upper case to deal with env variable issue. Updates to nginx.conf. * Fixed sha hashes. --------- Co-authored-by: weskubo-cgi <Wesley.Kubo@gov.bc.ca>
- Loading branch information
1 parent
e5a15e3
commit 858d93a
Showing
10 changed files
with
269 additions
and
37 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
51 changes: 51 additions & 0 deletions
51
backend/src/main/java/ca/bc/gov/hlth/hnweb/pbf/PBFProperties.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,51 @@ | ||
package ca.bc.gov.hlth.hnweb.pbf; | ||
|
||
import java.util.Map; | ||
import java.util.stream.Collectors; | ||
|
||
import org.springframework.boot.context.properties.ConfigurationProperties; | ||
import org.springframework.stereotype.Component; | ||
|
||
/** | ||
* Contains maps for PBF properties including: Cancel Reason, Deregistration | ||
* Reason, Registration Reason | ||
*/ | ||
@Component | ||
@ConfigurationProperties(prefix = "pbf") | ||
public class PBFProperties { | ||
|
||
private Map<String, String> cancelReasons; | ||
|
||
private Map<String, String> deregistrationReasons; | ||
|
||
private Map<String, String> registrationReasons; | ||
|
||
public Map<String, String> getCancelReasons() { | ||
return cancelReasons; | ||
} | ||
|
||
public void setCancelReasons(Map<String, String> cancelReasons) { | ||
this.cancelReasons = uppercaseKeys(cancelReasons); | ||
} | ||
|
||
public Map<String, String> getDeregistrationReasons() { | ||
return deregistrationReasons; | ||
} | ||
|
||
public void setDeregistrationReasons(Map<String, String> deregistrationReasons) { | ||
this.deregistrationReasons = uppercaseKeys(deregistrationReasons); | ||
} | ||
|
||
public Map<String, String> getRegistrationReasons() { | ||
return registrationReasons; | ||
} | ||
|
||
public void setRegistrationReasons(Map<String, String> registrationReasons) { | ||
this.registrationReasons = uppercaseKeys(registrationReasons); | ||
} | ||
|
||
private Map<String, String> uppercaseKeys(Map<String, String> reasons) { | ||
return reasons.entrySet().stream().collect(Collectors.toMap(e -> e.getKey().toUpperCase(), e -> e.getValue())); | ||
} | ||
|
||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.