forked from chb/indivo_server
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- fixes chb#42
- Loading branch information
Travers Franckle
committed
Dec 31, 2012
1 parent
d6a45d1
commit 3f3ceed
Showing
33 changed files
with
1,147 additions
and
468 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
from indivo.models import ClinicalNote | ||
|
||
social_history_fact = ClinicalNote( | ||
date="2012-05-17", | ||
title="Telephone note", | ||
format="http://purl.org/NET/mediatypes/text/plain", | ||
value="Patient's mother telephoned to say that he no longer needs documentation of a sports physical for school", | ||
provider_name_given="Josuha", | ||
provider_name_family="Mandel", | ||
) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
{ | ||
"__modelname__": "ClinicalNote", | ||
"date": "2012-05-17", | ||
"title": "Telephone note", | ||
"format": "http://purl.org/NET/mediatypes/text/plain", | ||
"value": "Patient's mother telephoned to say that he no longer needs documentation of a sports physical for school", | ||
"provider_name_given": "Josuha", | ||
"provider_name_family": "Mandel", | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
<Models xmlns="http://indivo.org/vocab/xml/documents#"> | ||
<Model name="ClinicalNote"> | ||
<Field name="date">2012-05-17</Field> | ||
<Field name="title">Telephone note</Field> | ||
<Field name="format">http://purl.org/NET/mediatypes/text/plain</Field> | ||
<Field name="value">Patient's mother telephoned to say that he no longer needs documentation of a sports physical for school</Field> | ||
<Field name="provider_name_given">Josuha</Field> | ||
<Field name="provider_name_family">Mandel</Field> | ||
</Model> | ||
</Models> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
from indivo.serializers import DataModelSerializers | ||
from indivo.data_models.options import DataModelOptions | ||
from indivo.lib.rdf import PatientGraph | ||
from indivo.validators import ValueInSetValidator, ExactValueValidator, NonNullValidator | ||
|
||
SNOMED_URI = 'http://purl.bioontology.org/ontology/SNOMEDCT/' | ||
|
||
class ClinicalNoteSerializers(DataModelSerializers): | ||
|
||
def to_rdf(queryset, result_count, record=None, carenet=None): | ||
if not record: | ||
record = carenet.record | ||
|
||
graph = PatientGraph(record) | ||
graph.addClinicalNoteList(queryset.iterator()) | ||
return graph.toRDF() | ||
|
||
class ClinicalNoteOptions(DataModelOptions): | ||
model_class_name = 'ClinicalNote' | ||
serializers = ClinicalNoteSerializers | ||
field_validators = { | ||
'format': [NonNullValidator()], | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
from indivo.models import Fact | ||
from indivo.fields import ProviderField | ||
from django.db import models | ||
|
||
class ClinicalNote(Fact): | ||
date = models.DateTimeField() | ||
title = models.CharField(max_length=255, null=True) | ||
format = models.CharField(max_length=255, null=True) | ||
value = models.CharField(max_length=255, null=True) | ||
provider = ProviderField() |
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.