center code search partition change
This commit is contained in:
@@ -22,7 +22,8 @@ test_collection = db.collection("testData")
|
||||
# start_date = sys.argv[1] # '2023-01-12' #input("Please enter the start date (yyyy-mm-dd): ")
|
||||
# end_date = sys.argv[2] #'2023-07-16' #input("Please enter the end date (yyyy-mm-dd): ")
|
||||
|
||||
query = patient_collection.where(filter=FieldFilter("createdAt", ">=", "2023-10-23")).o
|
||||
query = patient_collection.where(filter=FieldFilter("createdAt", ">=", "2023-10-26")).where(filter=FieldFilter("createdAt", "<", "2023-10-27"))
|
||||
#.where(filter=FieldFilter("registrationCenterName", "==", "SCS high school"))
|
||||
patient_docs = query.stream()
|
||||
|
||||
# Prepare data to store in CSV
|
||||
@@ -35,5 +36,8 @@ for patient_doc in patient_docs:
|
||||
# # print(patient_doc.id)
|
||||
# print(patient_data['_id'])
|
||||
print(patient_data['_id'])
|
||||
db.collection("patientData").document(patient_doc.id).update({"_idSearch": '20231023' + patient_data['_id']})
|
||||
# print(len(patient_data['_idSearch']))
|
||||
if "SAN" in patient_data['_id']:
|
||||
print("SAN")
|
||||
db.collection("patientData").document(patient_doc.id).update({"_idSearch": '20231102' + patient_data['_id']})
|
||||
|
||||
|
||||
Reference in New Issue
Block a user