Skip to content

Commit

Permalink
add a large number to the last visit_rank_order for death events
Browse files Browse the repository at this point in the history
  • Loading branch information
ChaoPang committed Jan 23, 2025
1 parent ad3a425 commit 102df2d
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/cehrbert_data/decorators/death_event_decorator.py
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ def _decorate(self, patient_events: DataFrame):
.withColumn("visit_occurrence_id", artificial_visit_id)
.withColumn("standard_concept_id", F.lit(DEATH_TOKEN))
.withColumn("domain", F.lit("death"))
.withColumn("visit_rank_order", F.lit(1) + F.col("visit_rank_order"))
.withColumn("visit_rank_order", F.lit(100) + F.col("visit_rank_order"))
.withColumn("priority", F.lit(DEATH_TOKEN_PRIORITY))
.withColumn("event_group_id", F.lit(NA))
.drop("max_visit_occurrence_id")
Expand Down

0 comments on commit 102df2d

Please sign in to comment.