Skip to content
This repository has been archived by the owner on Jul 17, 2024. It is now read-only.

Commit

Permalink
Revert "Use handleInfusionStartDefault instead of _getDur for inf time"
Browse files Browse the repository at this point in the history
This reverts commit ef52e51.
  • Loading branch information
mattfidler committed Sep 16, 2023
1 parent ef52e51 commit 754c5cf
Showing 1 changed file with 3 additions and 7 deletions.
10 changes: 3 additions & 7 deletions inst/include/rxode2parseHandleEvid.h
Original file line number Diff line number Diff line change
Expand Up @@ -260,6 +260,7 @@ extern "C" {
}

static inline int handleTlastInlineUpateDosingInformation(rx_solving_options_ind *ind, double *curDose, double *tinf) {
unsigned int p;
switch (ind->whI) {
case EVIDF_MODEL_RATE_ON: // modeled rate.
case EVIDF_MODEL_DUR_ON: // modeled duration.
Expand All @@ -278,13 +279,8 @@ extern "C" {
return 0;
} else {
// The amt in rxode2 is the infusion rate, but we need the amt
int startIdx, endIdx, idx;
startIdx=endIdx=ind->ixds;
idx=ind->idx;
double amt = getDoseNumber(ind, idx);
handleInfusionStartDefault(&startIdx, &endIdx, &amt, &idx,
&rx_global, &op_global,ind);
tinf[0] = getAllTimes(ind, ind->idose[endIdx]) - getAllTimes(ind, ind->idose[startIdx]);

tinf[0] = _getDur(ind->ixds, ind, 2, &p);
if (!ISNA(tinf[0])) {
curDose[0] = tinf[0] * curDose[0];
return 1;
Expand Down

0 comments on commit 754c5cf

Please sign in to comment.