Skip to content
Open
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
37 changes: 37 additions & 0 deletions api/src/main/java/org/openmrs/Order.java
Original file line number Diff line number Diff line change
Expand Up @@ -145,6 +145,13 @@ public enum FulfillerStatus {
@Column(name = "order_reason_non_coded", length = 255)
private String orderReasonNonCoded;

@ManyToOne
@JoinColumn(name = "discontinue_reason")
private Concept discontinueReason;

@Column(name = "discontinue_reason_non_coded", length = 255)
private String discontinueReasonNonCoded;

@Enumerated(EnumType.STRING)
@JdbcTypeCode(SqlTypes.VARCHAR)
@Column(name = "urgency", length = 50, nullable = false)
Expand Down Expand Up @@ -260,6 +267,8 @@ protected Order copyHelper(Order target) {
target.dateStopped = getDateStopped();
target.setOrderReason(getOrderReason());
target.setOrderReasonNonCoded(getOrderReasonNonCoded());
target.setDiscontinueReason(getDiscontinueReason());
target.setDiscontinueReasonNonCoded(getDiscontinueReasonNonCoded());
target.setAccessionNumber(getAccessionNumber());
target.setVoided(getVoided());
target.setVoidedBy(getVoidedBy());
Expand Down Expand Up @@ -458,6 +467,34 @@ public void setOrderReasonNonCoded(String orderReasonNonCoded) {
this.orderReasonNonCoded = orderReasonNonCoded;
}

/**
* @return Returns the discontinueReason.
*/
public Concept getDiscontinueReason() {
return discontinueReason;
}

/**
* @param discontinueReason The discontinueReason to set.
*/
public void setDiscontinueReason(Concept discontinueReason) {
this.discontinueReason = discontinueReason;
}

/**
* @return Returns the discontinueReasonNonCoded.
*/
public String getDiscontinueReasonNonCoded() {
return discontinueReasonNonCoded;
}

/**
* @param discontinueReasonNonCoded The discontinueReasonNonCoded to set.
*/
public void setDiscontinueReasonNonCoded(String discontinueReasonNonCoded) {
this.discontinueReasonNonCoded = discontinueReasonNonCoded;
}

/**
* @return the commentToFulfiller
* @since 1.10
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -141,6 +141,19 @@
<column name="description" type="varchar(255)"/>
</addColumn>
</changeSet>

</databaseChangeLog>

<changeSet id="TRUNK-6284-2026-03-31" author="0abhi007">
<comment>
Add discontinue_reason and discontinue_reason_non_coded to orders table for TRUNK-6284
</comment>

<addColumn tableName="orders">
<column name="discontinue_reason" type="int"/>
<column name="discontinue_reason_non_coded" type="varchar(255)"/>
</addColumn>
</changeSet>



Comment on lines +155 to +157
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can we minimize this space?

</databaseChangeLog>