Skip to content
Merged
Changes from all commits
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
5 changes: 3 additions & 2 deletions willisapi_client/services/metadata/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
from .language_choices import (
LANGUAGE_CHOICES,
)

from dateutil import parser

ALLOWED_COA_NAMES = ["MADRS", "YMRS", "PHQ-9", "GAD-7", "HAM-D17"]

Expand Down Expand Up @@ -453,11 +453,11 @@ def generate_payload(self) -> Dict[str, Any]:
"checksum": self.calculate_file_checksum(self.row.file_path),
"recording_order": int(self.row.recording_order),
"is_last_recording": self.row.is_last_recording,
"timestamp": parser.parse(self.row.timestamp).isoformat(),
}
return payload

def generate_processed_payload(self, files: List[Dict[str, str]]) -> Dict[str, Any]:

payload = {
"study_id": self.row.study_id,
"site_id": self.row.site_id,
Expand All @@ -471,6 +471,7 @@ def generate_processed_payload(self, files: List[Dict[str, str]]) -> Dict[str, A
"actual_scores": json.loads(self.row.scores_actual),
"files": files,
"force_upload": self.row.force_upload,
"timestamp": parser.parse(self.row.timestamp).isoformat(),
}
return payload

Expand Down