Aidbox
Aidbox.Dev
Aidbox.Cloud
Aidbox.One
Fhirbase
Search…
Getting started
Getting Started
Installation & Configuration
Features
Licensing and Support
Versioning & Release Notes
FAQ
Aidbox configuration
Aidbox project
API constructor (beta)
Setup SMTP provider
Zen Configuration
API
FHIR API
REST API
Bulk API
Batch Upsert
Batch/Transaction
Cache
ETAG support
Reactive API
Sequence API
Encryption API
Compartments API
GraphQL API
RPC API
Aidbox UI
Profiling and validation
Profiling and validation overview
Profiling with zen-lang
Asynchronous resource validation
Profiling with AidboxProfile
Terminology
Aidbox terminology module overview
Import external (not-present) terminologies
Concept
CodeSystem
ValueSet
$translate on ConceptMap
Terminology Tutorials
FHIR Implementation Guides
🎓
HL7 FHIR Da Vinci PDex Plan Net IG
§170.315(g)(10) Standardized API for patient and population services
Tutorials
Authentication Tutorial
Restricting Access to Patient Data
Uploading Sample Data
Custom Search
Patient Encounter notification Application
Working with pgAgent
Working with Extensions
Sync Data From Aidbox
SDC with Custom Resources
APM Aidbox
How to fix broken dates
Subscribe to new Patient resource
Creating user & set up full user access
App development guides
Testing with Stresty
Working with Aidbox from .NET
Administration
Receive logs from your app
$matcho
$to-format
Security & Access Control
Overview
Authentication Flows
Access Control
Multitenancy
Core Modules
Entities & Attributes
$json-schema
Monitoring
Logging & Audit
Storage
Archiving
Database
AWS S3
GCP Cloud Storage
Azure Blob Storage
Modules
HL7 v2 Integration
FHIR Resources
Custom Resources
Aidbox Search
First-Class Extensions
Multibox
Multibox box manager API
Multibox monitoring
Plan API
Plan API Overview
Patient Access API
Integrations
Analytics
Audit
Authentication
Tools
Mappings
Aidbox SDK
Contact us
Powered By
GitBook
How to fix broken dates
In some cases, you can have invalid data in your database- after importing data, or an error in SQL migrations.
For example, we have Patient resource with incorrect
birthDate
in the database. If we will try to search Patient by date, we will catch an error:
get
/fhir
/Patient?birthDate=2020-02-01
To fix this error we should find all incorrect dates in table via SQL query
1
select max((resource#>>'{birthDate}')::date) from patient;
Copied!
In response we catch an error
1
ERROR: date/time field value out of range: "2020-02-30"
Copied!
Now we can fix these dates:
1
update patient
2
set resource = resource || '{"birthDate": "2020-02-29"}'
3
where resource#>>'{birthDate}' = '2020-02-30';
Copied!
Previous
APM Aidbox
Next
Subscribe to new Patient resource
Last modified
23d ago
Copy link
Contents
get