Comments (5)
Hi @Henry6789 ,
what is the type of patient.reference
?
Could you try to use patient.to_reference()
there?
from fhir-py.
Another way suggested by @ruscoder is to just use subject=patient
:
device = client.resource(
"Device",
identifier={
"type": {
'coding': [
{
"system": 'https://hl7.org/fhir/ValueSet/identifier-type',
"code": 'SNO'
}
]
},
"value": sn
},
subject=patient
)
from fhir-py.
@mkizesov
Type of patient.reference is str, which is ok as far as I know. It's content is like "Patient/100".
Saving observations with the same patient reference works, which means the issue is device related.
The alternative by @ruscoder is very nice (will use this from now on), but the resulting reference is not saved either.
Maybe the issue is caused by the HAPI FHIR server (version 4.1.0) that I'm talking to.
Can you try if you can save a device with patient reference? Thanks in advance!
from fhir-py.
Problem solved.
The FHIR server that I'm using (mentioned above) supports FHIR standard R4.0.1.
R4.0.1 uses the 'patient' field to refer to a patient, while later FHIR releases (like 4.6.0) use the 'subject' field.
Sorry for raising an issue here, and thx for the support!
from fhir-py.
You are welcome. Also had a thought that it could be a server-related issue. So I close this issue.
from fhir-py.
Related Issues (20)
- Don't pass _count if _id is specified HOT 1
- Getting _elements when using reference not supported HOT 2
- Is there an API to handle the ValueSet resource? HOT 2
- Delete via reference currently requires download first HOT 4
- Persistent session support HOT 1
- Issue with client.execute() Method Removing Parameters from Path HOT 1
- Unable to use items() on AttrDict HOT 2
- Add support for `_cascade=delete` param to `delete` method HOT 1
- Why the save() function will cost a lot of time for saving one Resource?
- Use semantic-release for release cycle
- Pluggable data model layer HOT 5
- Next URL - relative to hostname HOT 3
- Example re: paging through a FHIR bundle? HOT 1
- AsyncFHIRClient's aiohttp throwing SSLCertVerificationError HOT 4
- Hashable resources HOT 10
- Add support for chained search params without specifying resource type
- Create aiohttp.ClientSession once per application rather than per request HOT 2
- Add fetch_raw_all support HOT 3
- Handle references HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from fhir-py.