-
Notifications
You must be signed in to change notification settings - Fork 21
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* HLM-4501: Added changes for HFReferral flow * updated comments for common models * updated comments for common models removed ini file This reverts commit c1e226f. * HLM-4501: updated topics and hfreferal constants * HLM-4501: updated HFReferralService.java * HLM-4501: Added changes in project id validator * HLM-4501: updated HFReferralService.java * HLM-4501: fixed hfreferral changes * HLM-4501: added project facility id validator for hf_referral * HLM-4501: missing link for validator added * HLM-4501: updated HfrProjectFacilityIdValidator for NPE * HLM-4501 : updated hf referral symtoms character length to 256 * HLM-4501: updated additionalFields field value size from 2 to 1
- Loading branch information
1 parent
ce0c5ca
commit dee30a1
Showing
33 changed files
with
1,573 additions
and
81 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
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
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
86 changes: 86 additions & 0 deletions
86
...models/src/main/java/org/egov/common/models/referralmanagement/hfreferral/HFReferral.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,86 @@ | ||
package org.egov.common.models.referralmanagement.hfreferral; | ||
|
||
import java.util.List; | ||
import javax.validation.Valid; | ||
import javax.validation.constraints.NotNull; | ||
import javax.validation.constraints.Size; | ||
|
||
import com.fasterxml.jackson.annotation.JsonIgnore; | ||
import com.fasterxml.jackson.annotation.JsonProperty; | ||
import digit.models.coremodels.AuditDetails; | ||
import lombok.AllArgsConstructor; | ||
import lombok.Builder; | ||
import lombok.Data; | ||
import lombok.NoArgsConstructor; | ||
import org.egov.common.models.project.AdditionalFields; | ||
import org.egov.common.models.referralmanagement.sideeffect.SideEffect; | ||
|
||
@Data | ||
@NoArgsConstructor | ||
@AllArgsConstructor | ||
@Builder | ||
public class HFReferral { | ||
|
||
@JsonProperty("id") | ||
@Size(min = 2, max = 64) | ||
private String id; | ||
|
||
@JsonProperty("clientReferenceId") | ||
@Size(min = 2, max = 64) | ||
private String clientReferenceId; | ||
|
||
@JsonProperty("tenantId") | ||
@NotNull | ||
@Size(min=2, max = 1000) | ||
private String tenantId; | ||
|
||
@JsonProperty("projectId") | ||
@Size(min = 2, max = 64) | ||
private String projectId; | ||
|
||
@JsonProperty("projectFacilityId") | ||
@Size(min = 2, max = 64) | ||
private String projectFacilityId; | ||
|
||
@JsonProperty("symptom") | ||
@NotNull | ||
@Size(min = 2, max = 256) | ||
private String symptom; | ||
|
||
@JsonProperty("symptomSurveyId") | ||
@Size(min = 2, max = 100) | ||
private String symptomSurveyId; | ||
|
||
@JsonProperty("beneficiaryId") | ||
@Size(max=100) | ||
private String beneficiaryId; | ||
|
||
@JsonProperty("referralCode") | ||
@Size(max=100) | ||
private String referralCode; | ||
|
||
@JsonProperty("nationalLevelId") | ||
@Size(max=100) | ||
private String nationalLevelId; | ||
|
||
@JsonProperty("isDeleted") | ||
private Boolean isDeleted = Boolean.FALSE; | ||
|
||
@JsonProperty("rowVersion") | ||
private Integer rowVersion; | ||
|
||
@JsonProperty("auditDetails") | ||
@Valid | ||
private AuditDetails auditDetails; | ||
|
||
@JsonProperty("clientAuditDetails") | ||
@Valid | ||
private AuditDetails clientAuditDetails; | ||
|
||
@JsonProperty("additionalFields") | ||
@Valid | ||
private AdditionalFields additionalFields; | ||
|
||
@JsonIgnore | ||
private Boolean hasErrors = Boolean.FALSE; | ||
} |
46 changes: 46 additions & 0 deletions
46
...main/java/org/egov/common/models/referralmanagement/hfreferral/HFReferralBulkRequest.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,46 @@ | ||
package org.egov.common.models.referralmanagement.hfreferral; | ||
|
||
import java.util.ArrayList; | ||
import java.util.List; | ||
import java.util.Objects; | ||
import javax.validation.Valid; | ||
import javax.validation.constraints.NotNull; | ||
import javax.validation.constraints.Size; | ||
|
||
import com.fasterxml.jackson.annotation.JsonProperty; | ||
import lombok.AllArgsConstructor; | ||
import lombok.Builder; | ||
import lombok.Data; | ||
import lombok.NoArgsConstructor; | ||
import org.egov.common.contract.request.RequestInfo; | ||
|
||
@Data | ||
@NoArgsConstructor | ||
@AllArgsConstructor | ||
@Builder | ||
public class HFReferralBulkRequest { | ||
@JsonProperty("RequestInfo") | ||
@NotNull | ||
@Valid | ||
private RequestInfo requestInfo; | ||
|
||
@JsonProperty("HFReferrals") | ||
@NotNull | ||
@Valid | ||
@Size(min = 1) | ||
private List<HFReferral> hfReferrals; | ||
|
||
/** | ||
* Add a HfReferral item to the list of HfReferrals in the bulk request. | ||
* | ||
* @param hfReferralItem The HfReferral item to add to the request. | ||
* @return The updated HFReferralBulkRequest. | ||
*/ | ||
public HFReferralBulkRequest addHFReferralItem(HFReferral hfReferralItem) { | ||
if(Objects.isNull(hfReferrals)) | ||
hfReferrals = new ArrayList<>(); | ||
if(Objects.nonNull(hfReferralItem)) | ||
hfReferrals.add(hfReferralItem); | ||
return this; | ||
} | ||
} |
Oops, something went wrong.