Skip to content

Commit

Permalink
Add test for flat_fields
Browse files Browse the repository at this point in the history
  • Loading branch information
pipliggins committed Aug 2, 2024
1 parent b951c78 commit 721fd72
Showing 1 changed file with 20 additions and 0 deletions.
20 changes: 20 additions & 0 deletions tests/test_base.py
Original file line number Diff line number Diff line change
@@ -1,9 +1,29 @@
from fhirflat.resources.encounter import Encounter
import fhirflat
import pandas as pd
import pytest
from pydantic.v1 import ValidationError


def test_flat_fields():
p = fhirflat.Patient()
ff = p.flat_fields()

assert ff == [
"id",
"extension",
"gender",
"birthDate",
"deceasedBoolean",
"deceasedDateTime",
"maritalStatus",
"multipleBirthBoolean",
"multipleBirthInteger",
"generalPractitioner",
"managingOrganization",
]


def test_validate_fhirflat_single_resource_errors():
df = pd.DataFrame(
{
Expand Down

0 comments on commit 721fd72

Please sign in to comment.