How can this scenario be modelled using Domain-Driven Design?

The domain is legal case management. Court cases are currently recorded in an excel sheet. A system is being developed by the defendant to help automate operations. This system would handle cases filed against the defendant in a court called Lowest Court. Each matter initially begins in the Lowest Court. There are three courts: Lowest Court, Middle Court, and Highest Court. After the judgement, if one of the parties believe that the judge made a mistake, they can choose to appeal the case. An appeal is the legal process to ask a higher court to review a decision by a judge in a lower court because you believe the judge made a mistake. Either the plaintiff or defendant could appeal the case. An appeal by one party creates a new case in the next court. In the excel file being maintained by the users, when the plaintiff appeals the case, the defendant (the users of this program) marks the new case as "Filed Against Us". The appeal type is marked as “Plaintiff Appeal” in the details of the original case. The details of the original case (the case in Lowest Court) contains some details about the next cases, and the appeal type of that next case (they have a set of columns dedicated to each court in the details of the Lowest Court. This set of columns is what contains the "appeal type"). Other courts have their own excel sheet. If the defendant appeals the case, they mark the new case as "Filed By Us". The appeal type is marked as “Defendant Appeal”. There is a special case called a "Cross Appeal", where both the plaintiff and the defendant appeal the case. In this case, two cases are created in the next court. The next court to the Lowest Court is the Middle Court. An appeal can be filed from the Middle Court as well. The next court to the Middle Court is the Highest Court. It is possible that after the judgement of a case, the Highest Court reverts a case back to the Middle Court. This works very similar to an appeal (a new case is created). It is theoretically possible for two Middle Court cases from a cross appeal to both be cross appealed individually, creating 4 cases in Highest Court. However, this has not been observed by the users in practice. A cross appeal in Middle Court typically results in a single decision. The users think that the Highest Court would likely consolidate the cases rather than treat them as 4 different appeals, but they are not sure. It is possible that two cases in Highest Court created by a cross appeal be reverted back to Middle Court as one case. The case in the Lowest Court should be able to track the cases in the higher courts. The users would like to see them when viewing the details of the case in the Lowest Court. The cases in both Middle Court and Highest Court should be able aware of the case that was appealed, due to which it was created.

Mar 19, 2025 - 14:36
 0
How can this scenario be modelled using Domain-Driven Design?

The domain is legal case management.

Court cases are currently recorded in an excel sheet. A system is being developed by the defendant to help automate operations. This system would handle cases filed against the defendant in a court called Lowest Court.

Each matter initially begins in the Lowest Court. There are three courts: Lowest Court, Middle Court, and Highest Court.

After the judgement, if one of the parties believe that the judge made a mistake, they can choose to appeal the case. An appeal is the legal process to ask a higher court to review a decision by a judge in a lower court because you believe the judge made a mistake. Either the plaintiff or defendant could appeal the case. An appeal by one party creates a new case in the next court.

In the excel file being maintained by the users, when the plaintiff appeals the case, the defendant (the users of this program) marks the new case as "Filed Against Us". The appeal type is marked as “Plaintiff Appeal” in the details of the original case. The details of the original case (the case in Lowest Court) contains some details about the next cases, and the appeal type of that next case (they have a set of columns dedicated to each court in the details of the Lowest Court. This set of columns is what contains the "appeal type"). Other courts have their own excel sheet. If the defendant appeals the case, they mark the new case as "Filed By Us". The appeal type is marked as “Defendant Appeal”. There is a special case called a "Cross Appeal", where both the plaintiff and the defendant appeal the case. In this case, two cases are created in the next court.

The next court to the Lowest Court is the Middle Court. An appeal can be filed from the Middle Court as well. The next court to the Middle Court is the Highest Court. It is possible that after the judgement of a case, the Highest Court reverts a case back to the Middle Court. This works very similar to an appeal (a new case is created).

It is theoretically possible for two Middle Court cases from a cross appeal to both be cross appealed individually, creating 4 cases in Highest Court. However, this has not been observed by the users in practice. A cross appeal in Middle Court typically results in a single decision. The users think that the Highest Court would likely consolidate the cases rather than treat them as 4 different appeals, but they are not sure. It is possible that two cases in Highest Court created by a cross appeal be reverted back to Middle Court as one case.

The case in the Lowest Court should be able to track the cases in the higher courts. The users would like to see them when viewing the details of the case in the Lowest Court.

The cases in both Middle Court and Highest Court should be able aware of the case that was appealed, due to which it was created.